HarmonyOS push的skills与applink的skills冲突

HarmonyOS
3天前
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
superinsect

可参考如下代码:

{
  "module": {
    "name": "entry",
    "type": "entry",
    "description": "$string:module_desc",
    "mainElement": "EntryAbility",
    "deviceTypes": [
      "phone",
      "2in1"
    ],
    "metadata": [
      {
        "name": "client_id",
        "value": "109834877"
      }
    ],
    "deliveryWithInstall": true,
    "installationFree": false,
    "pages": "$profile:main_pages",
    "abilities": [
      {
        "name": "EntryAbility",
        "srcEntry": "./ets/entryability/EntryAbility.ets",
        "description": "$string:EntryAbility_desc",
        "icon": "$media:icon_json",
        "label": "$string:EntryAbility_label",
        "startWindowIcon": "$media:icon_json",
        "startWindowBackground": "$color:start_window_background",
        "exported": true,
        "skills": [
          // applink 的skills
          {
            "entities": [
              "entity.system.home",
              "entity.system.browsable"
            ],
            "actions": [
              "action.system.home",
              "ohos.want.action.viewData"
            ],
            "uris": [
              {
                "scheme": "sohunews",
                "host": "pr",
              },
              {
                "scheme": "https",
                "host": "test3g.k.sohu.com",
              }
            ],
            // domainVerify须设置为true
            "domainVerify": true
          },
          // push 的skills 设置uris参数完成点击消息进入应用内页示例
          // 设置完成后需要https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/push-send-alert-V5#section8794131614597 参照2 配置对应的clickAction
          {
            "actions": [""],
            "uris": [
              {
                "scheme": "https",
                "host": "www.test.com",
                "port": "8080",
                "path": "push/test"
              }
            ]
          }
        ]
      }
    ],

    "requestPermissions": [
      {
        "name": "ohos.permission.GET_BUNDLE_INFO"
      },
      {
        "name": "ohos.permission.INTERNET"
      }
    ]
  }
}
分享
微博
QQ
微信
回复
3天前
相关问题
HarmonyOS skills 功能使用不成功
400浏览 • 1回复 待解决
HarmonyOS push推送跟Uris配置冲突问题
37浏览 • 1回复 待解决
HarmonyOS applink创建失败
36浏览 • 1回复 待解决
Scroll内Flex加宽高滑动冲突
2099浏览 • 1回复 待解决
HarmonyOS 触摸事件冲突问题
16浏览 • 1回复 待解决
HarmonyOS applink从浏览器跳转到应用
52浏览 • 1回复 待解决
HarmonyOS 关于给自己app推送push
36浏览 • 1回复 待解决
HarmonyOS 华为push和个推push推送效果
73浏览 • 1回复 待解决