HarmonyOS应用基础知识( 二 )


文章插图
 
表6 securityConfig对象的内部结构说明

HarmonyOS应用基础知识

文章插图
 
deviceConfig示例:
"deviceConfig": {"default": {"process": "com.huawei.hiworld.example","directLaunch": false,"supportBackup": false,"network": {"usesCleartext": true,"securityConfig": {"domainSettings": {"cleartextPermitted": true,"domains": [{"subDomains": true,"name": "example.ohos.com"}]}}}}}module对象的内部结构module对象包含HAP包的配置信息,内部结构说明参见表7 。
表7 module对象的内部结构说明
HarmonyOS应用基础知识

文章插图
 
module示例:
"module": {"package": "com.example.myapplication.entry","name": ".MyOHOSAbilityPackage","description": "$string:description_application","supportedModes": ["drive"],],"deviceType": ["car"],"distro": {"deliveryWithInstall": true,"moduleName": "ohos_entry","moduleType": "entry"},"abilities": [...],"shortcuts": [...],"js": [...],"reqPermissions": [...],"defPermissions": [...]}表8 distro对象的内部结构说明
HarmonyOS应用基础知识

文章插图
 
distro示例:
"distro": {"deliveryWithInstall": true,"moduleName": "ohos_entry","moduleType": "entry"} 表9 abilities对象的内部结构说明
HarmonyOS应用基础知识

文章插图
 

HarmonyOS应用基础知识

文章插图
 

HarmonyOS应用基础知识

文章插图
 

HarmonyOS应用基础知识

文章插图
 

HarmonyOS应用基础知识

文章插图
 
abilities示例:
"abilities": [{"name": ".MainAbility","description": "$string:description_main_ability","icon": "$media:hiworld.png","label": "HiMusic","type": "page","formEnabled": false,"launchType": "standard","orientation": "unspecified","permissions": [],"visible": false,"skills": [{"actions": ["action.system.home"],"entities": ["entity.system.home"]}],"configChanges": ["locale","layout","fontSize","orientation"],"directLaunch": false,"process": "string","backgroundModes": ["dataTransfer","audioPlayback","audioRecording","pictureInPicture","voip","location","bluetoothInteraction","wifiInteraction","screenFetch"],}]表10 skills对象的内部结构说明
HarmonyOS应用基础知识

文章插图
 
skills示例:
"skills": [{"actions": ["action.system.home"],"entities": ["entity.system.home"],"uris": [{"scheme": "http","host": "www.xxx.com","port": "8080","path": "query/student/name","type": "text"}]}]表11 form对象的内部结构说明
HarmonyOS应用基础知识

文章插图
 
form示例:
"form": {"formEntity": ["homeScreen","searchbox"],"minHeight": 100,"maxHeight": 200,"minWidth": 100,"maxWidth": 200}表12 js对象的内部结构说明
HarmonyOS应用基础知识

文章插图
 
js示例:
"js": [{"name": "default","pages": ["pages/index/index","pages/detail/detail"],"window": {"designWidth": 750,"autoDesignWidth": false}}]表13 shortcuts对象的内部结构说明
HarmonyOS应用基础知识


推荐阅读