项目中的module.json5文件中配置了actions和Uris,配置如下:
"abilities": [
{"name": "EntryAbility",
"srcEntry": "./ets/entryability/EntryAbility.ets",
"description": "$string:EntryAbility_desc",
"icon": "$media:icon",
"label": "$string:EntryAbility_label",
"startWindowIcon": "$media:splash_center_img",
"startWindowBackground": "$color:start_window_background",
"exported": true,
"orientation": "unspecified",
"skills": [
{
"entities": [
"entity.system.home",
"entity.system.browsable"
],
"actions": [
"action.system.home",
"ohos.want.action.viewData",
"ohos.nfc.tag.action.TAG_FOUND"
],
"uris": [{
"scheme": 'bocom',
},{
"scheme": 'https',
"host": "xxx"
},{
"scheme": 'https',
"host": "xxx"
}],
"domainVerify": true
}
],
}
],
配置完之后,导致push的内容收不到。
push点击消息进入应用内页并传递数据配置可以查看下面的链接:https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/push-send-alert-V5\#section8794131614597push的skills与其他的skills冲突,导致push消息收不到,可以参考下面的示例:
上面给出的示例是针对应用内的消息跳转的示例,actionType是1,如果这边需要同时支持跳转到首页,可以将entity.system.home的skill抽出来,比如: