文章插图
示例:
"shortcuts": [{"shortcutId": "id","label": "$string:shortcut","intents": [{"targetBundle": "com.huawei.hiworld.himusic","targetClass": "com.huawei.hiworld.himusic.entry.MainAbility"}]}]
配置文件示例以JSON文件为config.json的一个简单示例,该示例的应用声明为三个Ability 。
{"app": {"bundleName": "com.huawei.hiworld.himusic","vendor": "huawei","version": {"code": 2,"name": "2.0"}"apiVersion": {"compatible": 3,"target": 3}},"deviceConfig": {"default": {}},"module": {"package": "com.huawei.hiworld.himusic.entry","name": ".MainApplication","supportedModes": ["drive"],"distro": {"moduleType": "entry","deliveryWithInstall": true,"moduleName": "hap-car"},"deviceType": ["car"],"abilities": [{"name": ".MainAbility","description": "himusic main ability","icon": "$media:ic_launcher","label": "HiMusic","launchType": "standard","orientation": "unspecified","visible": true,"skills": [{"actions": ["action.system.home"],"entities": ["entity.system.home"]}],"type": "page","formEnabled": false},{"name": ".PlayService","description": "himusic play ability","icon": "$media:ic_launcher","label": "HiMusic","launchType": "standard","orientation": "unspecified","visible": false,"skills": [{"actions": ["action.play.music","action.stop.music"],"entities": ["entity.audio"]}],"type": "service","formEnabled": false,"backgroundModes": ["audioPlayback"]},{"name": ".UserADataAbility","type": "data","uri": "dataability://com.huawei.hiworld.himusic.UserADataAbility","visible": true}],"reqPermissions": [{"name": "ohos.permission.DISTRIBUTED_DATASYNC","reason": "","usedScene": {"ability": ["com.huawei.hiworld.himusic.entry.MainAbility","com.huawei.hiworld.himusic.entry.PlayService"],"when": "inuse"}}]}}
推荐阅读
- 如何卸载手机预装应用?这篇告诉你方法
- 教你几招,快速管理手机应用后台自启动,再用3年也不卡
- Hadoop基础知识总结
- 美团是如何应用Spark处理大数据的?
- API网关在微服务架构中的应用
- 空调加氟基础知识
- 安卓手机无需root也能“卸载”掉系统自带应用
- 5G掘金B端应用 五大产业站上风口
- 5G知识结构图
- 5G的行业应用