diff --git a/en/application-dev/background-agent-scheduled-reminder/background-agent-scheduled-reminder-guide.md b/en/application-dev/background-agent-scheduled-reminder/background-agent-scheduled-reminder-guide.md index 2858f1dd5fea1dd9a37c9eceb7fe9c57e0f177fc..cb31281e693400790ddb2f438ebb744d77ddaf89 100644 --- a/en/application-dev/background-agent-scheduled-reminder/background-agent-scheduled-reminder-guide.md +++ b/en/application-dev/background-agent-scheduled-reminder/background-agent-scheduled-reminder-guide.md @@ -563,12 +563,12 @@ Publish a 10-second countdown reminder. } ], wantAgent: { - pkgName: "com.example.phone", - abilityName: "com.example.phone.MainAbility" + pkgName: "com.example.device", + abilityName: "com.example.device.MainAbility" }, maxScreenWantAgent: { - pkgName: "com.example.phone", - abilityName: "com.example.phone.MainAbility" + pkgName: "com.example.device", + abilityName: "com.example.device.MainAbility" }, title: "this is title", content: "this is content", @@ -625,12 +625,12 @@ calendar: { }, ], wantAgent: { - pkgName: "com.example.phone", - abilityName: "com.example.phone.MainAbility" + pkgName: "com.example.device", + abilityName: "com.example.device.MainAbility" }, maxScreenWantAgent: { - pkgName: "com.example.phone", - abilityName: "com.example.phone.MainAbility" + pkgName: "com.example.device", + abilityName: "com.example.device.MainAbility" }, ringDuration: 5, snoozeTimes: 2, @@ -663,12 +663,12 @@ alarm: { }, ], wantAgent: { - pkgName: "com.example.phone", - abilityName: "com.example.phone.MainAbility" + pkgName: "com.example.device", + abilityName: "com.example.device.MainAbility" }, maxScreenWantAgent: { - pkgName: "com.example.phone", - abilityName: "com.example.phone.MainAbility" + pkgName: "com.example.device", + abilityName: "com.example.device.MainAbility" }, ringDuration: 5, snoozeTimes: 2, diff --git a/en/application-dev/quick-start/package-structure.md b/en/application-dev/quick-start/package-structure.md index ed520d784a3a3a27c3232f5a4b6adbd71a2e0d6d..fbf30d2e9d0e24af2ea9cb40de3a9b9aaf80459c 100644 --- a/en/application-dev/quick-start/package-structure.md +++ b/en/application-dev/quick-start/package-structure.md @@ -38,7 +38,7 @@ Example of config.json: "package": "com.example.myapplication.entrymodule", "name": ".MyApplication", "deviceType": [ - "phone" + "default" ], "distro": { "moduleName": "entry", @@ -129,14 +129,13 @@ Example of the app tag structure: ### Internal Structure of the deviceConfig Tag -The **deviceConfig** tag contains the application configuration information on the device, including attributes such as **default**, **phone**, **tv**, **car**, **wearable**, and **liteWearable**. The **default** configuration applies to all types of devices. You need to declare the peculiar configuration of a specific device type in the associated sub-tag of this type. For details about the internal structure, see Table 5. +The **deviceConfig** tag contains the application configuration information on the device, including attributes such as **default**, **tv**, **car**, **wearable**, and **liteWearable**. The **default** configuration applies to all types of devices. You need to declare the peculiar configuration of a specific device type in the associated sub-tag of this type. For details about the internal structure, see Table 5. Table 5 Internal structure of the deviceConfig tag | Attribute | Description | Data Type| Default | | ------------ | ----------------------------------------------- | -------- | ------------------ | | default | Application configuration applied to all types of devices. See Table 6. | Object | No | -| phone | Application configuration specific to smartphones. See Table 6. | Object | Yes (initial value: left empty)| | tablet | Application configuration specific to tablets. See Table 6. | Object | Yes (initial value: left empty)| | tv | Application configuration specific to smart TVs. See Table 6. | Object | Yes (initial value: left empty)| | car | Application configuration specific to head units. See Table 6. | Object | Yes (initial value: left empty)| @@ -149,9 +148,9 @@ Table 6 Internal structure of device attributes | Attribute | Description | Data Type| Default | | ------------------ | ------------------------------------------------------------ | -------- | ----------------------- | -| process | Name of the process running the application or ability. If the **process** attribute is configured in the **deviceConfig** tag, all abilities of the application run in this process. You can set the **process** attribute for a specific ability in the **abilities** attribute, so that the ability can run in the particular process. This attribute applies only to phones, tablets, smart TVs, head units, and wearable devices. The valuecan contain a maximum of 31 characters.| String | Yes | -| supportBackup | Whether the application supports backup and restoration. If this attribute is set to **false**, backup or restoration will not be performed for the application.
This attribute applies only to phones, tablets, smart TVs, head units, and wearable devices.| Boolean | Yes (initial value: **false**)| -| compressNativeLibs | Whether the **libs** libraries are packaged in the HAP file after being compressed. If this attribute is set to **false**, the **libs** libraries are stored without being compressed and will be directly loaded during the installation of the HAP file.
This attribute applies only to phones, tablets, smart TVs, head units, and wearable devices.| Boolean | Yes (initial value: **true**) | +| process | Name of the process running the application or ability. If the **process** attribute is configured in the **deviceConfig** tag, all abilities of the application run in this process. You can set the **process** attribute for a specific ability in the **abilities** attribute, so that the ability can run in the particular process. This attribute applies only to default, tablets, smart TVs, head units, and wearable devices. The valuecan contain a maximum of 31 characters. | String | Yes | +| supportBackup | Whether the application supports backup and restoration. If this attribute is set to **false**, backup or restoration will not be performed for the application.
This attribute applies only to default, tablets, smart TVs, head units, and wearable devices. | Boolean | Yes (initial value: **false**)| +| compressNativeLibs | Whether the **libs** libraries are packaged in the HAP file after being compressed. If this attribute is set to **false**, the **libs** libraries are stored without being compressed and will be directly loaded during the installation of the HAP file.
This attribute applies only to default, tablets, smart TVs, head units, and wearable devices. | Boolean | Yes (initial value: **true**) | | directLaunch | Whether the application can be started when the device is locked. If you want to start the application without unlocking the device, set this attribute to **true**. Devices running OpenHarmony do not support this attribute.| Boolean | Yes (initial value: **false**)| | ark | Maple configuration. See Table 7. | Object | Yes (initial value: left empty) | | network | Network security configuration. You can customize the network security settings of the application in the security statement of the configuration file without modifying the application code. See Table 9.| Object | Yes (initial value: left empty) | @@ -219,18 +218,18 @@ Table 11 Internal structure of the module tag | Attribute | Description | Data Type | Default | | --------------- | ------------------------------------------------------------ | ---------- | ------------------------------------------------------------ | | mainAbility | Ability displayed on the Service Center icon. When the resident process is started, the **mainAbility** is started.| String | No if any ability using the Page template exists | -| package | Structure name of the HAP file. The value must be unique in the application. The value is a string with a maximum of 127 bytes, in the reverse domain name notation. It is recommended that the value be the same as the project directory of the HAP file. This attribute applies only to phones, tablets, smart TVs, head units, and wearable devices.| String | No | -| name | Class name of the HAP file. The value is in the reverse domain name notation. The prefix must be the same as the package name specified by the **package** label at the same level. The value can also start with a period (.). The value is a string with a maximum of 255 bytes.
This attribute applies only to phones, tablets, smart TVs, head units, and wearable devices.| String | No | -| description | Description of the HAP file. The value is a string with a maximum of 255 bytes. If the value exceeds the limit or needs to support multiple languages, you can use a resource index to the description. This attribute applies only to phones, tablets, smart TVs, head units, and wearable devices.| String | Yes (initial value: left empty) | +| package | Structure name of the HAP file. The value must be unique in the application. The value is a string with a maximum of 127 bytes, in the reverse domain name notation. It is recommended that the value be the same as the project directory of the HAP file. This attribute applies only to default, tablets, smart TVs, head units, and wearable devices. | String | No | +| name | Class name of the HAP file. The value is in the reverse domain name notation. The prefix must be the same as the package name specified by the **package** label at the same level. The value can also start with a period (.). The value is a string with a maximum of 255 bytes.
This attribute applies only to default, tablets, smart TVs, head units, and wearable devices. | String | No | +| description | Description of the HAP file. The value is a string with a maximum of 255 bytes. If the value exceeds the limit or needs to support multiple languages, you can use a resource index to the description. This attribute applies only to default, tablets, smart TVs, head units, and wearable devices. | String | Yes (initial value: left empty) | | supportedModes | Mode supported by the application. Currently, only the **drive** mode is defined. This attribute applies only to head units.| String array| Yes (initial value: left empty) | -| deviceType | Type of device on which the abilities can run. The device types predefined in the system include **phone**, **tablet**, **tv**, **car**, **wearable**, and **liteWearable**.| String array| No | -| distro | Distribution description of the current HAP file. This attribute applies only to phones, tablets, smart TVs, head units, and wearable devices. For details, see Table 12.| Object | No | +| deviceType | Type of device on which the abilities can run. The device types predefined in the system include **tablet**, **tv**, **car**, **wearable**, and **liteWearable**. | String array| No | +| distro | Distribution description of the current HAP file. This attribute applies only to default, tablets, smart TVs, head units, and wearable devices. For details, see Table 12. | Object | No | | metaData | Metadata of the HAP file. For details, see Table 13. | Object | Yes (initial value: left empty) | | abilities | All abilities in the current module. The value is an array of objects, each of which represents a shortcut object. For details, see Table 17.| Object array | Yes (initial value: left empty) | | js | A set of JS modules developed using the ArkUI framework. Each element in the set represents the information about a JS module. For details, see Table 22.| Object array | Yes (initial value: left empty) | | shortcuts | Shortcut information of the application. The value is an array of objects, each of which represents a shortcut object. For details, see Table 25.| Object array | Yes (initial value: left empty) | | reqPermissions | Permissions that the application applies for from the system before its running. For details, see Table 21. | Object array | Yes (initial value: left empty) | -| colorMode | Color mode of the application.
**dark**: Resources applicable for the dark mode are selected.
**light**: Resources applicable for the light mode are selected.
**auto**: Resources are selected based on the color mode of the system.
This attribute applies only to phones, tablets, smart TVs, head units, and wearable devices.| String | Yes (initial value: **auto**) | +| colorMode | Color mode of the application.
**dark**: Resources applicable for the dark mode are selected.
**light**: Resources applicable for the light mode are selected.
**auto**: Resources are selected based on the color mode of the system.
This attribute applies only to default, tablets, smart TVs, head units, and wearable devices. | String | Yes (initial value: **auto**) | | distroFilter | Application distribution rules.
This attribute defines the rules for distributing HAP files based on different device specifications, so that precise matching can be performed when HUAWEI AppGallery distributes applications. Applications can be distributed by API version, screen shape, or screen resolution. During distribution, a unique HAP is determined based on the mapping between **deviceType** and these three factors. For details, see Table 29.| Object | Yes (initial value: left empty) Configure this attribute when an application has multiple entry modules.| | reqCapabilities | Device capabilities required for running the application. | String array| Yes (initial value: left empty) | | commonEvents | Static broadcast. For details, see Table 35. | Object array | Yes (initial value: left empty) | @@ -348,12 +347,12 @@ Table 17 Internal structure of the abilities attribute | Attribute | Description | Data Type | Default | | ---------------- | ------------------------------------------------------------ | ---------- | -------------------------------------------------------- | | process | Name of the process running the application or ability. If the **process** attribute is configured in the **deviceConfig** tag, all abilities of the application run in this process. You can set the **process** attribute for a specific ability in the **abilities** attribute, so that the ability can run in the particular process. If this attribute is set to the name of the process running other applications, all these applications can run in the same process, provided they have the same unified user ID and the same signature. Devices running OpenHarmony do not support this attribute.| String | Yes (initial value: left empty) | -| name | Name of the ability. The value is a reverse domain name, in the format of "*Bundle name*.*Class name*", for example, **"com.example.myapplication.MainAbility"**. Alternatively, the value can start with a period (.) followed by the class name, for example, **".MainAbility"**.
The ability name must be unique in an application. This attribute applies only to phones, tablets, smart TVs, head units, and wearable devices.
Note: When you use DevEco Studio to create a project, the configuration of the first ability is generated by default, including the **MainAbility.java** file and the class name **MainAbility** defaulted in the **name** string for the **abilities** attribute in **config.json**. The value of this attribute can be customized if you use other IDE tools. The value can contain a maximum of 127 characters.| String | No | +| name | Name of the ability. The value is a reverse domain name, in the format of "*Bundle name*.*Class name*", for example, **"com.example.myapplication.MainAbility"**. Alternatively, the value can start with a period (.) followed by the class name, for example, **".MainAbility"**.
The ability name must be unique in an application. This attribute applies only to default, tablets, smart TVs, head units, and wearable devices.
Note: When you use DevEco Studio to create a project, the configuration of the first ability is generated by default, including the **MainAbility.java** file and the class name **MainAbility** defaulted in the **name** string for the **abilities** attribute in **config.json**. The value of this attribute can be customized if you use other IDE tools. The value can contain a maximum of 127 characters. | String | No | | description | Description of the ability. The value can be a string or a resource index to descriptions in multiple languages. The value can contain a maximum of 255 characters.| String | Yes (initial value: left empty) | | icon | Index to the ability icon file. Example value: **$media:ability_icon**. In the **skills** attribute of the ability, if the **actions** value contains **action.system.home** and the **entities** value contains **entity.system.home**, the icon of the ability is also used as the icon of the application. If multiple abilities address this condition, the icon of the first candidate ability is used as the application icon.
Note: The **icon** and **label** values of an application are visible to users. Ensure that at least one of them is different from any existing icons or labels.| String | Yes (initial value: left empty) | | label | Ability name visible to users. The value can be a name string or a resource index to names in multiple languages. In the **skills** attribute of the ability, if the **actions** value contains **action.system.home** and the **entities** value contains **entity.system.home**, the label of the ability is also used as the label of the application. If multiple abilities address this condition, the label of the first candidate ability is used as the application label.
Note: The **icon** and **label** values of an application are visible to users. Ensure that at least one of them is different from any existing icons or labels. The value can be a reference to a string defined in a resource file or a string enclosed in brackets ({}). The value can contain a maximum of 255 characters.| String | Yes (initial value: left empty) | | uri | Uniform Resource Identifier (URI) of the ability. The value can contain a maximum of 255 characters. | String | Yes (No for abilities using the Data template) | -| launchType | Startup type of the ability. The value can be **standard**, **singleMission**, or **singleton**.
**standard**: Multiple **Ability** instances can be created during startup.
Most abilities can use this type.
**singleMission**: Only a single **Ability** instance can be created in each task stack during startup.
**singleton**: Only a single **Ability** instance can be created across all task stacks during startup. For example, a globally unique incoming call screen uses the singleton startup type. This attribute applies only to phones, tablets, smart TVs, head units, and wearable devices.| String | Yes (initial value: **standard**) | +| launchType | Startup type of the ability. The value can be **standard**, **singleMission**, or **singleton**.
**standard**: Multiple **Ability** instances can be created during startup.
Most abilities can use this type.
**singleMission**: Only a single **Ability** instance can be created in each task stack during startup.
**singleton**: Only a single **Ability** instance can be created across all task stacks during startup. For example, a globally unique incoming call screen uses the singleton startup type. This attribute applies only to default, tablets, smart TVs, head units, and wearable devices. | String | Yes (initial value: **standard**) | | visible | Whether the ability can be called by other applications.
**true**: The ability can be called by other applications.
**false**: The ability cannot be called by other applications.| Boolean | Yes (initial value: **false**) | | permissions | Permissions required for abilities of another application to call the current ability, generally in the format of a reverse domain name. The value can be either the permissions predefined in the OS or your custom permissions.| String array| Yes (initial value: left empty) | | skills | Types of the **want** that can be accepted by the ability. | Object array | Yes (initial value: left empty) | @@ -363,13 +362,13 @@ Table 17 Internal structure of the abilities attribute | orientation | Display orientation of the ability. This attribute applies only to the ability using the Page template. Available values are as follows:
unspecified: indicates that the system automatically determines the display orientation of the ability.
**landscape**: indicates the landscape orientation.
**portrait**: indicates the portrait orientation.
**followRecent**: indicates that the orientation follows the most recent application in the stack.| String | Yes (initial value: **unspecified**) | | backgroundModes | Background service type of the ability. You can assign multiple background service types to a specific ability. This attribute applies only to the ability using the Service template. Available values are as follows:
**dataTransfer**: service for downloading, backing up, sharing, or transferring data from the network or peer devices
**audioPlayback**: audio playback service
**audioRecording**: audio recording service
**pictureInPicture**: picture in picture (PiP) and small-window video playback services
**voip**: voice/video call and VoIP services
**location**: location and navigation services
**bluetoothInteraction**: Bluetooth scanning, connection, and transmission services
**wifiInteraction**: WLAN scanning, connection, and transmission services
**screenFetch**: screen recording and screenshot services
**multiDeviceConnection**: multi-device interconnection service| String array| Yes (initial value: left empty) | | grantPermission | Whether permissions can be granted for any data in the ability. | Boolean | Yes (initial value: left empty) | -| readPermission | Permission required for reading data in the ability. This attribute applies only to the ability using the Data template. The value is a string with a maximum of 255 bytes. This attribute applies only to phones, tablets, smart TVs, head units, and wearable devices.| String | Yes (initial value: left empty) | -| writePermission | Permission required for writing data to the ability. This attribute applies only to the ability using the Data template. The value is a string with a maximum of 255 bytes. This attribute applies only to phones, tablets, smart TVs, head units, and wearable devices.| String | Yes (initial value: left empty) | +| readPermission | Permission required for reading data in the ability. This attribute applies only to the ability using the Data template. The value is a string with a maximum of 255 bytes. This attribute applies only to default, tablets, smart TVs, head units, and wearable devices. | String | Yes (initial value: left empty) | +| writePermission | Permission required for writing data to the ability. This attribute applies only to the ability using the Data template. The value is a string with a maximum of 255 bytes. This attribute applies only to default, tablets, smart TVs, head units, and wearable devices. | String | Yes (initial value: left empty) | | configChanges | System configurations that the ability concerns. Upon any changes on the concerned configurations, the **onConfigurationUpdated** callback will be invoked to notify the ability. Available values are as follows:
**mcc**: indicates that the mobile country code (MCC) of the IMSI is changed. Typical scenario: A SIM card is detected, and the MCC is updated.
**mnc**: indicates that the mobile network code (MNC) of the IMSI is changed. Typical scenario: A SIM card is detected, and the MNC is updated.
**locale**: indicates that the locale is changed. Typical scenario: The user has selected a new language for the text display of the device.
**layout**: indicates that the screen layout is changed. Typical scenario: Currently, different display forms are all in the active state.
**fontSize**: indicates that font size is changed. Typical scenario: A new global font size is set.
**orientation**: indicates that the screen orientation is changed. Typical scenario: The user rotates the device.
**density**: indicates that the display density is changed. Typical scenario: The user may specify different display ratios, or different display forms are active at the same time.
**size**: indicates that the size of the display window is changed.
**smallestSize**: indicates that the length of the shorter side of the display window is changed.
**colorMode**: indicates that the color mode is changed.| String array| Yes (initial value: left empty) | -| mission | Task stack of the ability. This attribute applies only to the ability using the Page template. By default, all abilities in an application belong to the same task stack. This attribute applies only to phones, tablets, smart TVs, head units, and wearable devices.| String | Yes (initial value: bundle name of the application) | -| targetAbility | Target ability that this ability alias points to. This attribute applies only to the ability using the Page template. If the **targetAbility** attribute is set, only **name**, **icon**, **label**, **visible**, **permissions**, and **skills** take effect in the current ability (ability alias). Other attributes use the values of the **targetAbility** attribute. The target ability must belong to the same application as the alias and must be declared in **config.json** ahead of the alias. This attribute applies only to phones, tablets, smart TVs, head units, and wearable devices.| String | Yes (initial value: left empty, indicating that the current ability is not an alias)| -| multiUserShared | Whether the ability supports data sharing among multiple users. This attribute applies only to the ability using the Data template. If this attribute is set to **true**, only one copy of data is stored for multiple users. Note that this attribute will invalidate the **visible** attribute. This attribute applies only to phones, tablets, smart TVs, head units, and wearable devices.| Boolean | Yes (initial value: **false**) | -| supportPipMode | Whether the ability allows the user to enter the Picture in Picture (PiP) mode. The PiP mode enables the user to watch a video in a small window that hovers on top of a full screen window (main window). This attribute applies only to the ability using the Page template. This attribute applies only to phones, tablets, smart TVs, head units, and wearable devices.| Boolean | Yes (initial value: **false**) | +| mission | Task stack of the ability. This attribute applies only to the ability using the Page template. By default, all abilities in an application belong to the same task stack. This attribute applies only to default, tablets, smart TVs, head units, and wearable devices. | String | Yes (initial value: bundle name of the application) | +| targetAbility | Target ability that this ability alias points to. This attribute applies only to the ability using the Page template. If the **targetAbility** attribute is set, only **name**, **icon**, **label**, **visible**, **permissions**, and **skills** take effect in the current ability (ability alias). Other attributes use the values of the **targetAbility** attribute. The target ability must belong to the same application as the alias and must be declared in **config.json** ahead of the alias. This attribute applies only to default, tablets, smart TVs, head units, and wearable devices. | String | Yes (initial value: left empty, indicating that the current ability is not an alias)| +| multiUserShared | Whether the ability supports data sharing among multiple users. This attribute applies only to the ability using the Data template. If this attribute is set to **true**, only one copy of data is stored for multiple users. Note that this attribute will invalidate the **visible** attribute. This attribute applies only to default, tablets, smart TVs, head units, and wearable devices. | Boolean | Yes (initial value: **false**) | +| supportPipMode | Whether the ability allows the user to enter the Picture in Picture (PiP) mode. The PiP mode enables the user to watch a video in a small window that hovers on top of a full screen window (main window). This attribute applies only to the ability using the Page template. This attribute applies only to default, tablets, smart TVs, head units, and wearable devices. | Boolean | Yes (initial value: **false**) | | formsEnabled | Whether the ability can provide forms. This attribute applies only to the ability using the Page template.
**true**: This ability can provide forms.
**false**: This ability cannot provide forms.| Boolean | Yes (initial value: **false**) | | forms | Details about the forms used by the ability. This attribute is valid only when **formsEnabled** is set to **true**. For details, see Table 27.| Object array | Yes (initial value: left empty) | | srcLanguage | Programming language used to develop the ability. | String | The value can be **java**, **js**, or **ets**. | @@ -506,7 +505,7 @@ Table 22 Internal structure of the js attribute | -------- | ------------------------------------------------------------ | -------- | ------------------------ | | name | Name of a JavaScript component. The default value is **default**. | String | No | | pages | Route information about all pages in the JavaScript component, including the page path and page name. The value is an array, in which each element represents a page. The first element in the array represents the home page of the JavaScript FA.| Array | No | -| window | Window-related configurations. This attribute applies only to phones, tablets, smart TVs, head units, and wearable devices. For details, see Table 23.| Object | Yes | +| window | Window-related configurations. This attribute applies only to default, tablets, smart TVs, head units, and wearable devices. For details, see Table 23. | Object | Yes | | type | Type of the JavaScript component. Available values are as follows:
**normal**: indicates that the JavaScript component is an application instance.
**form**: indicates that the JavaScript component is a widget instance.| String | Yes (initial value: **normal**)| | mode | Development mode of the JavaScript component. For details, see Table 24. | Object | Yes (initial value: left empty) | diff --git a/zh-cn/application-dev/background-agent-scheduled-reminder/background-agent-scheduled-reminder-guide.md b/zh-cn/application-dev/background-agent-scheduled-reminder/background-agent-scheduled-reminder-guide.md index bb77011ba0b4182153bf0bf1fdcace9e7d7f3d10..354cf1f372dbbc825a03e30ad2163b98eef427e6 100644 --- a/zh-cn/application-dev/background-agent-scheduled-reminder/background-agent-scheduled-reminder-guide.md +++ b/zh-cn/application-dev/background-agent-scheduled-reminder/background-agent-scheduled-reminder-guide.md @@ -150,12 +150,12 @@ interface LocalDateTime:时间信息实例 } ], wantAgent: { - pkgName: "com.example.phone", - abilityName: "com.example.phone.MainAbility" + pkgName: "com.example.device", + abilityName: "com.example.device.MainAbility" }, maxScreenWantAgent: { - pkgName: "com.example.phone", - abilityName: "com.example.phone.MainAbility" + pkgName: "com.example.device", + abilityName: "com.example.device.MainAbility" }, title: "this is title", content: "this is content", @@ -209,12 +209,12 @@ calendar: { }, ], wantAgent: { - pkgName: "com.example.phone", - abilityName: "com.example.phone.MainAbility" + pkgName: "com.example.device", + abilityName: "com.example.device.MainAbility" }, maxScreenWantAgent: { - pkgName: "com.example.phone", - abilityName: "com.example.phone.MainAbility" + pkgName: "com.example.device", + abilityName: "com.example.device.MainAbility" }, ringDuration: 5, snoozeTimes: 2, @@ -247,12 +247,12 @@ alarm: { }, ], wantAgent: { - pkgName: "com.example.phone", - abilityName: "com.example.phone.MainAbility" + pkgName: "com.example.device", + abilityName: "com.example.device.MainAbility" }, maxScreenWantAgent: { - pkgName: "com.example.phone", - abilityName: "com.example.phone.MainAbility" + pkgName: "com.example.device", + abilityName: "com.example.device.MainAbility" }, ringDuration: 5, snoozeTimes: 2, diff --git a/zh-cn/application-dev/quick-start/module-structure.md b/zh-cn/application-dev/quick-start/module-structure.md index 171d345d57229a4b0fc5227732a662cb013f89ad..81f679b9c4e5725d39826bc5a9f8827cc2b92200 100644 --- a/zh-cn/application-dev/quick-start/module-structure.md +++ b/zh-cn/application-dev/quick-start/module-structure.md @@ -46,7 +46,6 @@ module.json示例: "process": "string", "mainElement": "MainAbility", "deviceTypes": [ - "phone", "tablet", "tv", "wearable", @@ -55,7 +54,6 @@ module.json示例: "vr", "car", "earphones", - "pc", "speaker", "smartVision", "linkIoT", @@ -220,7 +218,6 @@ hap包的配置信息,该标签下的配置只对当前hap包生效。 | 中文 | 英文 | 枚举值 | 设备类型 | | ------------ | ------------ | ------------ | -------------------------------------------------------- | -| 智能手机 | smartphone | phone | 手机 | | 平板 | tablet | tablet | 平板,带屏音箱 | | 智慧屏 | smart TV | tv | | | 智能手表 | smart watch | wearable | 智能手表,儿童手表,特指资源较丰富的的手表,具备电话功能 | @@ -229,7 +226,6 @@ hap包的配置信息,该标签下的配置只对当前hap包生效。 | 虚拟现实 | VR | vr | | | 车机 | head unit | car | | | 耳机 | earphones | earphones | | -| 个人计算机 | PC | pc | | | 音箱 | speaker | speaker | 无屏音箱,有屏音箱,通过硬件profile | | 智慧视觉设备 | Smart Vision | smartVision | 带摄像头的设备,通过硬件profile分开是否 | | 联接类模组 | linkiot | linkIoT | Wi-Fi模组,蓝牙模组 | @@ -243,7 +239,7 @@ deviceTypes示例: "name": "myHapName",         "type": "har", "deviceTypes" : [ - "phone" + "wearable" ] } } @@ -257,7 +253,7 @@ pages示例:        "name": "myHapName",         "type": "har", "deviceTypes" : [ - "phone" + "wearable" ],         "pages": "$profile:pages_config"     } diff --git a/zh-cn/application-dev/quick-start/package-structure.md b/zh-cn/application-dev/quick-start/package-structure.md index a09afe709143f5f74a35eda3383ea2d30dfd54ed..bea3f988e3f4098caad06dd53a19f7affb937636 100644 --- a/zh-cn/application-dev/quick-start/package-structure.md +++ b/zh-cn/application-dev/quick-start/package-structure.md @@ -38,7 +38,7 @@ config.json示例: "package": "com.example.myapplication.entrymodule", "name": ".MyApplication", "deviceType": [ - "phone" + "default" ], "distro": { "moduleName": "entry", @@ -129,29 +129,28 @@ app实例: ### deviceConfig对象的内部结构 -deviceConfig包含设备上的应用配置信息,可以包含default,phone,tv,car,wearable,liteWearable等属性。default标签内的配置是适用于所有通用设备,其他设备类型如果有特殊的需求,则需要在该设备类型的标签下进行配置。内部结构说明参见表5。 +deviceConfig包含设备上的应用配置信息,可以包含default,tv,car,wearable,liteWearable等属性。default标签内的配置是适用于所有通用设备,其他设备类型如果有特殊的需求,则需要在该设备类型的标签下进行配置。内部结构说明参见表5。 表5 deviceConfig对象的内部结构说明 | 属性名称 | 含义 | 数据类型 | 是否可缺省 | | ------------ | ----------------------------------------------- | -------- | ------------------ | | default | 表示所有设备通用的应用配置信息。参考表6。 | 对象 | 否 | -| phone | 表示手机类设备的应用信息配置。参考表6。 | 对象 | 可缺省,缺省值为空 | | tablet | 表示平板的应用配置信息。参考表6。 | 对象 | 可缺省,缺省值为空 | | tv | 表示智慧屏特有的应用配置信息。参考表6。 | 对象 | 可缺省,缺省值为空 | | car | 表示车机特有的应用配置信息。参考表6。 | 对象 | 可缺省,缺省值为空 | | wearable | 表示智能穿戴特有的应用配置信息。参考表6。 | 对象 | 可缺省,缺省值为空 | | liteWearable | 表示轻量级智能穿戴特有的应用配置信息。参考表6。 | 对象 | 可缺省,缺省值为空 | -default、phone、tablet、tv、car、wearable、liteWearble等对象的内部结构说明,可参见表6。 +default、tablet、tv、car、wearable、liteWearble等对象的内部结构说明,可参见表6。 表6 不同设备的内部结构说明 | 属性名称 | 含义 | 数据类型 | 是否可缺省 | | ------------------ | ------------------------------------------------------------ | -------- | ----------------------- | -| process | 表示应用或者Ability的进程名。如果在deviceConfig标签下配置了process标签,则该应用的所有Ability都运行在这个进程中。如果在abilities标签下也为某个Ability配置了process标签,则该Ability就运行在这个进程中。该标签仅适用于手机、平板、智慧屏、车机、智慧穿戴。该标签最大长度为31。 | 字符串 | 是 | -| supportBackup | 表示应用是否支持备份和恢复。如果配置为"false",则不支持为该应用执行备份或恢复操作。
该标签仅适用于手机、平板、智慧屏、车机、智能穿戴。 | 布尔值 | 可缺省,缺省值为"false" | -| compressNativeLibs | 表示libs库是否以压缩存储的方式打包到HAP包。如果配置为"false",则libs库以不压缩的方式存储,HAP包在安装时无需解压libs,运行时会直接从HAP内加载libs库。
该标签仅适用于手机、平板、智慧屏、车机、智能穿戴。 | 布尔值 | 可缺省,缺省值为"true" | +| process | 表示应用或者Ability的进程名。如果在deviceConfig标签下配置了process标签,则该应用的所有Ability都运行在这个进程中。如果在abilities标签下也为某个Ability配置了process标签,则该Ability就运行在这个进程中。该标签仅适用于默认设备、平板、智慧屏、车机、智慧穿戴。该标签最大长度为31。 | 字符串 | 是 | +| supportBackup | 表示应用是否支持备份和恢复。如果配置为"false",则不支持为该应用执行备份或恢复操作。
该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。 | 布尔值 | 可缺省,缺省值为"false" | +| compressNativeLibs | 表示libs库是否以压缩存储的方式打包到HAP包。如果配置为"false",则libs库以不压缩的方式存储,HAP包在安装时无需解压libs,运行时会直接从HAP内加载libs库。
该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。 | 布尔值 | 可缺省,缺省值为"true" | | directLaunch | 指定设备被锁定时是否可以启动应用程序。如果要在不解锁设备的情况下启动应用程序,请将此设备设置为"true"。运行OHOS的设备不支持此属性。 | 布尔值 | 可缺省,缺省值为"false" | | ark | 标识maple配置信息。参考表7。 | 对象 | 是缺省为空 | | network | 表示网络安全性配置。该标签允许应用通过配置文件的安全声明来自定义其网络安全,无需修改应用代码。参考表9。 | 对象 | 可缺省,缺省值为空 | @@ -219,18 +218,18 @@ module对象包含HAP包的配置信息,内部结构说明参见表11。 | 属性名称 | 含义 | 数据类型 | 是否可缺省 | | --------------- | ------------------------------------------------------------ | ---------- | ------------------------------------------------------------ | | mainAbility | 服务中心图标露出的ability,常驻进程拉起时会启动mainAbility。 | 字符串 | 如果存在page类型的ability,则该字段不可缺省。 | -| package | 表示HAP的包结构名称,在应用内保证唯一性。采用反向域名格式(建议与HAP的工程目录保持一致)。字符串长度不超过127字节。该标签仅适用于手机、平板、智慧屏、车机、智能穿戴。 | 字符串 | 否 | -| name | 表示HAP的类名。采用反向域名 方式表示,前缀要与同级的package标签指定的包名一致,也可采用"."开头的命名方式。字符串长度不超过255字节。
该标签仅适用于手机、平板、智慧屏、车机、智能穿戴。 | 字符串 | 否 | -| description | 表示HAP的描述信息。字符串长度不超过255字节。如果字符串超出长度或者需要支持多语言,可以采用资源索引的方式添加描述内容。该标签仅适用于手机、平板、智慧屏、车机、智能穿戴。 | 字符串 | 可缺省,缺省值为空 | +| package | 表示HAP的包结构名称,在应用内保证唯一性。采用反向域名格式(建议与HAP的工程目录保持一致)。字符串长度不超过127字节。该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。 | 字符串 | 否 | +| name | 表示HAP的类名。采用反向域名 方式表示,前缀要与同级的package标签指定的包名一致,也可采用"."开头的命名方式。字符串长度不超过255字节。
该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。 | 字符串 | 否 | +| description | 表示HAP的描述信息。字符串长度不超过255字节。如果字符串超出长度或者需要支持多语言,可以采用资源索引的方式添加描述内容。该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。 | 字符串 | 可缺省,缺省值为空 | | supportedModes | 表示应用支持的运行模式,当前只定义了驾驶模式(drive)。该标签只适用于车机。 | 字符串数组 | 可缺省,缺省值为空 | -| deviceType | 表示允许Ability运行的设备类型。系统预定义的设备类型包括:phone(手机)、tablet(平板)、tv(智慧屏)、car(车机)、wearable(智能穿戴)、liteWearable(轻量级智能穿戴)等。 | 字符串数组 | 否 | -| distro | 表示HAP发布的具体描述。该标签仅适用于手机、平板、智慧屏、车机、智能穿戴。参考表12。 | 对象 | 否 | +| deviceType | 表示允许Ability运行的设备类型。系统预定义的设备类型包括:tablet(平板)、tv(智慧屏)、car(车机)、wearable(智能穿戴)、liteWearable(轻量级智能穿戴)等。 | 字符串数组 | 否 | +| distro | 表示HAP发布的具体描述。该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。参考表12。 | 对象 | 否 | | metaData | 表示HAP的元信息。参考表13。 | 对象 | 可缺省,缺省值为空 | | abilities | 表示当前模块内的所有Ability。采用对象数据格式。其中的每个元素表示一个快捷方式对象。参考表17。 | 对象数组 | 可缺省,缺省值为空 | | js | 表示基于ArkUI框架开发的JS模块集合,其中的每个元素代表一个JS模块的信息。参考表22。 | 对象数组 | 可缺省,缺省值为空 | | shortcuts | 表示应用的快捷方式信息。采用对象数组格式,其中的每个元素表示一个快捷方式对象。参考表25。 | 对象数组 | 可缺省,缺省值为空 | | reqPermissions | 表示应用运行时向系统申请的权限。参考表21。 | 对象数组 | 可缺省,缺省值为空 | -| colorMode | 表示应用自身的颜色模式。
dark:表示按照深色模式选取资源。
light:表示按照浅色模式选取资源。
auto:表示跟随系统的颜色模式值选取资源。
该标签仅适用于手机、平板、智慧屏、车机、智能穿戴。 | 字符串 | 可缺省,缺省值为"auto" | +| colorMode | 表示应用自身的颜色模式。
dark:表示按照深色模式选取资源。
light:表示按照浅色模式选取资源。
auto:表示跟随系统的颜色模式值选取资源。
该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。 | 字符串 | 可缺省,缺省值为"auto" | | distroFilter | 表示应用的分发规则。
该标签用于定义HAP包对应的细分设备规格的分发策略,以便在应用市场进行云端分发应用包时做精准匹配。该标签可配置的分发策略维度包括API Verion、屏幕形状、屏幕分辨率。在进行分发时,通过deviceType与这三个属性的匹配关系,唯一确定一个用于分发到设备的HAP。参考表29。 | 对象 | 可缺省,缺省值为空。但当应用中包含多个entry模块时,必须配置该标签。 | | reqCapabilities | 表示运行应用程序所需的设备能力 | 字符串数组 | 可缺省,缺省为空 | | commonEvents | 静态广播,参考表35。 | 对象数组 | 可缺省,缺省为空 | @@ -348,12 +347,12 @@ metaData示例: | 属性名称 | 含义 | 数据类型 | 是否可缺省 | | ---------------- | ------------------------------------------------------------ | ---------- | -------------------------------------------------------- | | process | 运行应用程序或Ability的进程名称。如果在deviceConfig标记中配置了进程,则应用程序的所有能力都在此进程中运行。您还可以为特定能力设置流程属性,以便该能力可以在此流程中运行。如果此属性设置为与其他应用程序相同的进程名称,则所有这些应用程序可以在同一进程中运行,前提是他们具有相同的联合用户ID和相同的签名。运行OHOS的设备不支持此属性。 | 字符串 | 可缺省,缺省值为空。 | -| name | 表示Ability名称。取值可采用反向域名方式表示,由包名和类名组成,如“com.example.myapplication.MainAbility”;也可采用“.”开头的类名方式表示,如“.MainAbility”。
Ability的名称,需在一个应用的范围内保证唯一。该标签仅适用于手机、平板、智慧屏、车机、智能穿戴。
说明:在使用DevEco Studio新建项目时,默认生成首个Ability的配置,包括生成“MainAbility.java”文件,及“config.json”中“MainAbility”的配置。如使用其他IDE工具,可自定义名称。该标签最大长度为127。 | 字符串 | 否 | +| name | 表示Ability名称。取值可采用反向域名方式表示,由包名和类名组成,如“com.example.myapplication.MainAbility”;也可采用“.”开头的类名方式表示,如“.MainAbility”。
Ability的名称,需在一个应用的范围内保证唯一。该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。
说明:在使用DevEco Studio新建项目时,默认生成首个Ability的配置,包括生成“MainAbility.java”文件,及“config.json”中“MainAbility”的配置。如使用其他IDE工具,可自定义名称。该标签最大长度为127。 | 字符串 | 否 | | description | 表示对Ability的描述。取值可以是描述性内容,也可以是对描述性内容的资源索引,以支持多语言。该标签最大长度为255。 | 字符串 | 可缺省,缺省值为空。 | | icon | 表示Ability图标资源文件的索引。取值示例:$media:ability_icon。如果在该Ability的skills属性中,actions的取值包含 “action.system.home”,entities取值中包含“entity.system.home”,则该Ability的icon将同时作为应用的icon。如果存在多个符合条件的Ability,则取位置靠前的Ability的icon作为应用的icon。
说明:应用的“icon”和“label”是用户可感知配置项,需要区别于当前所有已有的应用“icon”或“label”(至少有一个不同)。 | 字符串 | 可缺省,缺省值为空。 | | label | 表示Ability对用户显示的名称。取值可以是Ability名称,也可以是对该名称的资源索引,以支持多语言。如果在该Ability的skills属性中,actions的取值包含 “action.system.home”,entities取值中包含“entity.system.home”,则该Ability的label将同时作为应用的label。如果存在多个符合条件的Ability,则取位置靠前的Ability的label作为应用的label。
说明: 应用的“icon”和“label”是用户可感知配置项,需要区别于当前所有已有的应用“icon”或“label”(至少有一个不同)。该标签为资源文件中定义的字符串的引用,或以"{}"包括的字符串。该标签最大长度为255。 | 字符串 | 可缺省,缺省值为空。 | | uri | 表示Ability的统一资源标识符。该标签最大长度为255。 | 字符串 | 可缺省,对于data类型的Ability不可缺省。 | -| launchType | 表示Ability的启动模式,支持“standard”、“singleMission”和“singleton”三种模式:
standard:表示该Ability可以有多实例。
“standard”模式适用于大多数应用场景。
singleMission:表示此Ability在每个任务栈中只能有一个实例。
singleton:表示该Ability在所有任务栈中仅可以有一个实例。例如,具有全局唯一性的呼叫来电界面即采用“singleton”模式。该标签仅适用于手机、平板、智慧屏、车机、智能穿戴。 | 字符串 | 可缺省,缺省值为“standard”。 | +| launchType | 表示Ability的启动模式,支持“standard”、“singleMission”和“singleton”三种模式:
standard:表示该Ability可以有多实例。
“standard”模式适用于大多数应用场景。
singleMission:表示此Ability在每个任务栈中只能有一个实例。
singleton:表示该Ability在所有任务栈中仅可以有一个实例。例如,具有全局唯一性的呼叫来电界面即采用“singleton”模式。该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。 | 字符串 | 可缺省,缺省值为“standard”。 | | visible | 表示Ability是否可以被其他应用调用。
true:可以被其他应用调用。
false:不能被其他应用调用。 | 布尔类型 | 可缺省,缺省值为“false”。 | | permissions | 表示其他应用的Ability调用此Ability时需要申请的权限。通常采用反向域名格式,取值可以是系统预定义的权限,也可以是开发者自定义的权限。 | 字符串数组 | 可缺省,缺省值为空。 | | skills | 表示Ability能够接收的want的特征。 | 对象数组 | 可缺省,缺省值为空。 | @@ -363,13 +362,13 @@ metaData示例: | orientation | 表示该Ability的显示模式。该标签仅适用于page类型的Ability。取值范围如下:
unspecified:由系统自动判断显示方向。
landscape:横屏模式。
portrait:竖屏模式。
followRecent:跟随栈中最近的应用。 | 字符串 | 可缺省,缺省值为“unspecified”。 | | backgroundModes | 表示后台服务的类型,可以为一个服务配置多个后台服务类型。该标签仅适用于service类型的Ability。取值范围如下:
dataTransfer:通过网络/对端设备进行数据下载、备份、分享、传输等业务。
audioPlayback:音频输出业务。
audioRecording:音频输入业务。
pictureInPicture:画中画、小窗口播放视频业务。
voip:音视频电话、VOIP业务。
location:定位、导航业务。
bluetoothInteraction:蓝牙扫描、连接、传输业务。
wifiInteraction:WLAN扫描、连接、传输业务。
screenFetch:录屏、截屏业务。
multiDeviceConnection:多设备互联业务 | 字符串数组 | 可缺省,缺省值为空。 | | grantPermission | 指定是否可以向Ability内任何数据授予权限。 | 布尔值 | 可缺省,缺省值为空。 | -| readPermission | 表示读取Ability的数据所需的权限。该标签仅适用于data类型的Ability。取值为长度不超过255字节的字符串。该标签仅适用于手机、平板、智慧屏、车机、智能穿戴。 | 字符串 | 可缺省,缺省为空。 | -| writePermission | 表示向Ability写数据所需的权限。该标签仅适用于data类型的Ability。取值为长度不超过255字节的字符串。该标签仅适用于手机、平板、智慧屏、车机、智能穿戴。 | 字符串 | 可缺省,缺省为空。 | +| readPermission | 表示读取Ability的数据所需的权限。该标签仅适用于data类型的Ability。取值为长度不超过255字节的字符串。该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。 | 字符串 | 可缺省,缺省为空。 | +| writePermission | 表示向Ability写数据所需的权限。该标签仅适用于data类型的Ability。取值为长度不超过255字节的字符串。该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。 | 字符串 | 可缺省,缺省为空。 | | configChanges | 表示Ability关注的系统配置集合。当已关注的配置发生变更后,Ability会收到onConfigurationUpdated回调。取值范围:
mcc:表示IMSI移动设备国家/地区代码(MCC)发生变更。典型场景:检测到SIM并更新MCC。
mnc:IMSI移动设备网络代码(MNC)发生变更。典型场景:检测到SIM并更新MNC。
locale:表示语言区域发生变更。典型场景:用户已为设备文本的文本显示选择新的语言类型。
layout:表示屏幕布局发生变更。典型场景:当前有不同的显示形态都处于活跃状态。
fontSize:表示字号发生变更。典型场景:用户已设置新的全局字号。
orientation:表示屏幕方向发生变更。典型场景:用户旋转设备。
density:表示显示密度发生变更。典型场景:用户可能指定不同的显示比例,或当前有不同的显示形态同时处于活跃状态。
size:显示窗口大小发生变更。
smallestSize:显示窗口较短边的边长发生变更。
colorMode:颜色模式发生变更。 | 字符串数组 | 可缺省,缺省为空。 | -| mission | 表示Ability指定的任务栈。该标签仅适用于page类型的Ability。默认情况下应用中所有Ability同属一个任务栈。该标签仅适用于手机、平板、智慧屏、车机、智能穿戴。 | 字符串 | 可缺省,缺省为应用的包名。 | -| targetAbility | 表示当前Ability重用的目标Ability。该标签仅适用于page类型的Ability。如果配置了targetAbility属性,则当前Ability(即别名Ability)的属性中仅name、icon、label、visible、permissions、skills生效,其它属性均沿用targetAbility中的属性值。目标Ability必须与别名Ability在同一应用中,且在配置文件中目标Ability必须在别名之前进行声明。该标签仅适用于手机、平板、智慧屏、车机、智能穿戴。 | 字符串 | 可缺省,缺省值为空。表示当前Ability不是一个别名Ability。 | -| multiUserShared | 表示Ability是否支持多用户状态进行共享,该标签仅适用于data类型的Ability。配置为“true”时,表示在多用户下只有一份存储数据。需要注意的是,该属性会使visible属性失效。该标签仅适用于手机、平板、智慧屏、车机、智能穿戴。 | 布尔类型 | 可缺省,缺省值为“false”。 | -| supportPipMode | 表示Ability是否支持用户进入PIP模式(用于在页面最上层悬浮小窗口,俗称“画中画”,常见于视频播放等场景)。该标签仅适用于page类型的Ability。该标签仅适用于手机、平板、智慧屏、车机、智能穿戴。 | 布尔类型 | 可缺省,缺省值为“false”。 | +| mission | 表示Ability指定的任务栈。该标签仅适用于page类型的Ability。默认情况下应用中所有Ability同属一个任务栈。该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。 | 字符串 | 可缺省,缺省为应用的包名。 | +| targetAbility | 表示当前Ability重用的目标Ability。该标签仅适用于page类型的Ability。如果配置了targetAbility属性,则当前Ability(即别名Ability)的属性中仅name、icon、label、visible、permissions、skills生效,其它属性均沿用targetAbility中的属性值。目标Ability必须与别名Ability在同一应用中,且在配置文件中目标Ability必须在别名之前进行声明。该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。 | 字符串 | 可缺省,缺省值为空。表示当前Ability不是一个别名Ability。 | +| multiUserShared | 表示Ability是否支持多用户状态进行共享,该标签仅适用于data类型的Ability。配置为“true”时,表示在多用户下只有一份存储数据。需要注意的是,该属性会使visible属性失效。该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。 | 布尔类型 | 可缺省,缺省值为“false”。 | +| supportPipMode | 表示Ability是否支持用户进入PIP模式(用于在页面最上层悬浮小窗口,俗称“画中画”,常见于视频播放等场景)。该标签仅适用于page类型的Ability。该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。 | 布尔类型 | 可缺省,缺省值为“false”。 | | formsEnabled | 表示Ability是否支持卡片(forms)功能。该标签仅适用于page类型的Ability。
true:支持卡片能力。
false:不支持卡片能力。 | 布尔类型 | 可缺省,缺省值为“false”。 | | forms | 表示服务卡片的属性。该标签仅当formsEnabled为“true”时,才能生效。参考表27。 | 对象数组 | 可缺省,缺省值为空。 | | srcLanguage | Ability开发语言的类型。 | 字符串 | 取值为java、js或ets | @@ -506,7 +505,7 @@ skills示例: | -------- | ------------------------------------------------------------ | -------- | ------------------------ | | name | 表示JS Component的名字。该标签不可缺省,默认值为default。 | 字符串 | 否 | | pages | 表示JS Component的页面用于列举JS Component中每个页面的路由信息[页面路径+页面名称]。该标签不可缺省,取值为数组,数组第一个元素代表JS FA首页。 | 数组 | 否 | -| window | 用于定义与显示窗口相关的配置。该标签仅适用于手机、平板、智慧屏、车机、智能穿戴。参考表23。 | 对象 | 可缺省 | +| window | 用于定义与显示窗口相关的配置。该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。参考表23。 | 对象 | 可缺省 | | type | 表示JS应用的类型。取值范围如下:
normal:标识该JS Component为应用实例。
form:标识该JS Component为卡片实例。 | 字符串 | 可缺省,缺省值为“normal” | | mode | 定义JS组件的开发模式。参考表24。 | 对象 | 可缺省,缺省值为空 |