在module.json5中配置了uris的内容,结果配置后发现收不到推送了,还请协助排查。当前module.json5配置如下,如下把uris删除则能正常收到推送,但是AppLinking不能用了。
"abilities": [
{
"name": "EntryAbility",
"srcEntry": "./ets/entryability/EntryAbility.ets",
"description": "$string:EntryAbility_desc",
"icon": "$media:app_icon",
"label": "$string:app_name",
"startWindowIcon": "$media:start_window_icon",
"orientation": "unspecified",
"startWindowBackground": "$color:start_window_background",
"supportWindowMode": ["fullscreen"],
"exported": true,
"skills": [
{
"entities": [
"entity.system.home",
"entity.system.browsable"
],
"actions": [
"action.system.home",
"ohos.want.action.viewData",
"ohos.nfc.tag.action.TAG_FOUND",
//推送通知类消息接收
"com.xxx",
//推送后台消息接收
"action.ohos.push.listener"
],
"uris": [
{
"scheme": "cmblife"
},
{
"scheme": "http",
"host": "cmbt.cn",
"path": "/c"
},
{
"scheme": "http",
"host": "cmbt.cn",
"pathStartWith": "/c/"
},
{
"scheme": "https",
"host": "cmbt.cn",
"path": "/c"
},
{
"scheme": "https",
"host": "cmbt.cn",
"pathStartWith": "/c/"
},
{
"scheme": "https",
"host": "open.cmbchina.com",
"pathStartWith": "/dispatch/"
},
{
"scheme": "https",
"host": "sandbox.cdcc.cmbchina.com",
"pathStartWith": "/dispatch/"
}
],
// domainVerify须设置为true
"domainVerify": true
}
]
}
],
https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/push-send-alert-V5\#section8794131614597
设置actions参数完成,点击消息进入应用内页示例(若skills中添加了uris参数,则uris内容需为空)
设置uris参数完成,点击消息进入应用内页示例(skills中必须同时设置actions参数,actions参数为空)+skill[{},{}]。