#鸿蒙通关秘籍#如何为应用配置自定义进程名?

HarmonyOS
2024-12-03 10:09:33
912浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
CISO晨光熹

你可以基于多进程管理的为指定HAP配置一个自定义进程名。

// module.json5
"abilities": [
{
  "name": "EntryAbility",
  "srcEntry": "./ets/entryability/EntryAbility.ets",
  "description": "$string:EntryAbility_desc",
  "icon": "$media:layered_image",
  "label": "$string:EntryAbility_label",
  "startWindowIcon": "$media:startIcon",
  "startWindowBackground": "$color:start_window_background",
  "exported": true,
  "skills": [
    {
      "entities": [
        "entity.system.home"
      ],
      "actions": [
        "action.system.home"
      ]
    }
  ]
},
{
  "name": "DocAbility",
  "srcEntry": "./ets/entryability/MyComponent.ets",
  "description": "$string:EntryAbility_desc",
  "icon": "$media:layered_image",
  "label": "$string:EntryAbility_label",
  "startWindowIcon": "$media:startIcon",
  "startWindowBackground": "$color:start_window_background",
  "exported": true,
  "isolationProcess": true,
  "skills": [
    {
      "entities": [
        "entity.system.home"
      ],
      "actions": [
        "action.system.home"
      ]
    }
  ]
}
]
  • 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.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
已于2024-12-17 15:40:30修改
分享
微博
QQ
微信
回复
2024-12-03 12:10:54
相关问题
HarmonyOS 应用名称如何自定义配置
1012浏览 • 0回复 待解决
HarmonyOS 应用名称如何自定义配置
1245浏览 • 1回复 待解决