HarmonyOS 使用appgallery推送测试,应用无法收到消息?

如题:HarmonyOS 使用appgallery推送测试,应用无法收到消息?

阅读 509
1 个回答

https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/push-send-alert-V5\#section8794131614597

参考文档说明,push跳转的skill中不能同时设置有值的actions和uris。对于点击消息进入应用首页,如下skill中只能有actions不能有uris。

{
  "entities": [
  "entity.system.home"
  ],
  "actions": [
  "action.system.home"
  ]
}

module.json5文件中的skills标签下可以同时存在多个skill对象,每个对象对应一种能力。

若需要同时设置推送消息跳转能力和其他跳转能力(如NFC跳转、浏览器跳转等),需要在skills数组中创建不同的skill对象,分别映射对应的能力。