module.json5中的AbilityA的skills中不仅需要配置actions还配置uris,只希望通过actions进行拉起,怎么配置

module.json5中的AbilityA的skills中不仅需要配置actions还配置uris,只希望通过actions进行拉起,怎么配置?

HarmonyOS
2024-09-19 11:07:32
1802浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
superinsect

仍然在module.json5中配置,但是需要将actions和uris单独作为skills的子项进行配置,而不能仅作为一个子项进行配置。

{ 
  "name": "OtherAbility", 
  "srcEntry": "./ets/otherability/OtherAbility.ets", 
  "description": "$string:OtherAbility_desc", 
  "icon": "$media:layered_image", 
  "label": "$string:OtherAbility_label", 
  "startWindowIcon": "$media:startIcon", 
  "startWindowBackground": "$color:start_window_background", 
  "launchType": "specified", 
  "skills": [ 
    { 
      "actions": [ 
        "actions.tpns.push" 
      ] 
    }, 
    { 
      "uris": [ 
        { 
          "scheme": "https", 
          "host": "wxxxxx", 
          "port": "8080", 
          "pathStartWith": "query" 
        } 
      ] 
    } 
  ] 
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
分享
微博
QQ
微信
回复
2024-09-19 15:47:01
相关问题
HarmonyOS module.json5配置问题
825浏览 • 1回复 待解决
module.json5配置文件type含义
1406浏览 • 1回复 待解决
stage模式下,module.json5配置
1332浏览 • 1回复 待解决
entry下module.json5包含哪些信息?
22733浏览 • 2回复 待解决