未验证 提交 51370f2c 编写于 作者: K king_he 提交者: Gitee

update en/application-dev/reference/apis/js-apis-Bundle.md.

Signed-off-by: Nking_he <6384784@qq.com>
上级 38a82978
# Bundle Module (JavaScript SDK APIs)
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
......@@ -17,8 +17,8 @@ SystemCapability.BundleManager.BundleFramework
| Required Permissions | Permission Level | Description |
| ---------------------------------------- | ------------ | --------- |
| ohos.permission.GET_BUNDLE_INFO | normal | Permission to query information about the current application.|
| ohos.permission.GET_BUNDLE_INFO_PRIVILEGED| system_basic | Permission to query information about all applications.|
| ohos.permission.GET_BUNDLE_INFO | normal | Permission to query information about the current application. |
| ohos.permission.GET_BUNDLE_INFO_PRIVILEGED| system_basic | Permission to query information about all applications. |
| ohos.permission.INSTALL_BUNDLE | system_core | Permission to install or uninstall applications. |
## bundle.getApplicationInfo
......@@ -40,14 +40,14 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ----------- | ------ | ---- | --------------------------------------- |
| bundleName | string | Yes | Bundle name of the application. |
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0.|
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0. |
| userId | number | No | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0. |
**Return value**
| Type | Description |
| ------------------------- | ------------------ |
| Promise\<ApplicationInfo> | Promise used to return the application information.|
| Promise\<ApplicationInfo> | Promise used to return the application information. |
**Example**
......@@ -84,7 +84,7 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ----------- | ------------------------------- | ---- | --------------------------------------- |
| bundleName | string | Yes | Bundle name of the application. |
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0.|
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0. |
| userId | number | Yes | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0. |
| callback | AsyncCallback\<ApplicationInfo> | Yes | Callback used to return the application information. |
......@@ -123,7 +123,7 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ----------- | ------------------------------- | ---- | --------------------------------------- |
| bundleName | string | Yes | Bundle name of the application. |
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0.|
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0. |
| callback | AsyncCallback\<ApplicationInfo> | Yes | Callback used to return the application information. |
**Example**
......@@ -159,14 +159,14 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ---------- | ---------- | ---- | --------------------------------------- |
| bundleFlag | BundleFlag | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0.|
| bundleFlag | BundleFlag | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0. |
| userId | number | No | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0. |
**Return value**
| Type | Description |
| --------------------------- | -------------------------- |
| Promise<Array\<BundleInfo>> | Promise used to return the information of all available bundles.|
| Promise<Array\<BundleInfo>> | Promise used to return the information of all available bundles. |
**Example**
......@@ -201,7 +201,7 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ---------- | --------------------------------- | ---- | --------------------------------------- |
| bundleFlag | BundleFlag | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0.|
| bundleFlag | BundleFlag | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0. |
| callback | AsyncCallback<Array\<BundleInfo>> | Yes | Callback used to return the information of all available bundles. |
**Example**
......@@ -236,7 +236,7 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ---------- | --------------------------------- | ---- | --------------------------------------- |
| bundleFlag | BundleFlag | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0.|
| bundleFlag | BundleFlag | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0. |
| userId | number | Yes | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0. |
| callback | AsyncCallback<Array\<BundleInfo>> | Yes | Callback used to return the information of all available bundles. |
......@@ -275,14 +275,14 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ----------- | ------------- | ---- | --------------------------------------- |
| bundleName | string | Yes | Bundle name. |
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0.|
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0. |
| options | BundleOptions | No | Includes **userId**. |
**Return value**
| Type | Description |
| -------------------- | ---------------------------- |
| Promise\<BundleInfo> | Promise used to return the bundle information.|
| Promise\<BundleInfo> | Promise used to return the bundle information. |
**Example**
......@@ -321,7 +321,7 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ----------- | -------------------------- | ---- | --------------------------------------- |
| bundleName | string | Yes | Bundle name. |
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0.|
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0. |
| callback | AsyncCallback\<BundleInfo> | Yes | Callback used to return the bundle information. |
**Example**
......@@ -358,7 +358,7 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ----------- | -------------------------- | ---- | --------------------------------------- |
| bundleName | string | Yes | Bundle name. |
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0.|
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0. |
| options | BundleOptions | Yes | Includes **userId**. |
| callback | AsyncCallback\<BundleInfo> | Yes | Callback used to return the bundle information. |
......@@ -398,14 +398,14 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ----------- | ------ | ---- | --------------------------------------- |
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0.|
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0. |
| userId | number | No | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0. |
**Return value**
| Type | Description |
| -------------------------------- | ------------------------------- |
| Promise<Array\<ApplicationInfo>> | Promise used to return the application information.|
| Promise<Array\<ApplicationInfo>> | Promise used to return the application information. |
**Example**
......@@ -440,7 +440,7 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ----------- | -------------------------------------- | ---- | --------------------------------------- |
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0.|
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0. |
| userId | number | No | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0. |
| callback | AsyncCallback<Array\<ApplicationInfo>> | Yes | Callback used to return the application information. |
......@@ -477,7 +477,7 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ----------- | -------------------------------------- | ---- | --------------------------------------- |
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0.|
| bundleFlags | number | Yes | Type of information that will be returned. The default value is **0**. The value must be greater than or equal to 0. |
| callback | AsyncCallback<Array\<ApplicationInfo>> | Yes | Callback used to return the application information. |
**Example**
......@@ -512,13 +512,13 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ----------- | ------ | ---- | ---------------- |
| bundleName | string | Yes | Bundle name of the application. |
| abilityName | string | Yes | Ability name.|
| abilityName | string | Yes | Ability name. |
**Return value**
| Type | Description |
| --------------------- | --------------------- |
| Promise\<AbilityInfo> | Promise used to return the ability information.|
| Promise\<AbilityInfo> | Promise used to return the ability information. |
**Example**
......@@ -552,8 +552,8 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ----------- | ------------ | ---- | ---------------- |
| bundleName | string | Yes | Bundle name of the application. |
| abilityName | string | Yes | Ability name.|
| callback | AsyncCallback\<AbilityInfo> | Yes | Callback used to return the ability information.|
| abilityName | string | Yes | Ability name. |
| callback | AsyncCallback\<AbilityInfo> | Yes | Callback used to return the ability information. |
**Example**
......@@ -588,13 +588,13 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ----------- | ------ | ---- | ---------------- |
| bundleName | string | Yes | Bundle name of the application. |
| abilityName | string | Yes | Ability name.|
| abilityName | string | Yes | Ability name. |
**Return value**
| Type | Description |
| ---------------- | ------------------ |
| Promise\<string> | Promise used to return the application name.|
| Promise\<string> | Promise used to return the application name. |
**Example**
......@@ -628,7 +628,7 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ----------- | ---------------------- | ---- | ---------------- |
| bundleName | string | Yes | Bundle name of the application. |
| abilityName | string | Yes | Ability name.|
| abilityName | string | Yes | Ability name. |
| callback | AsyncCallback\<string> | Yes | Callback used to return the application name. |
**Example**
......@@ -663,13 +663,13 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ---- | ----------- | ---- | ------------ |
| info | AbilityInfo | Yes | Ability information.|
| info | AbilityInfo | Yes | Ability information. |
**Return value**
| Type | Description |
| ----------------- | ------------------------- |
| Promise\<boolean> | Promise used to return whether the ability is enabled. If the ability is enabled, **true** will be returned; otherwise, **false** will be returned.|
| Promise\<boolean> | Promise used to return whether the ability is enabled. If the ability is enabled, **true** will be returned; otherwise, **false** will be returned. |
**Example**
......@@ -705,7 +705,7 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| -------- | ----------------------- | ---- | --------------- |
| info | AbilityInfo | Yes | Ability information. |
| callback | AsyncCallback\<boolean> | Yes | Callback used to return whether the ability is enabled. If the ability is enabled, **true** will be returned; otherwise, **false** will be returned.|
| callback | AsyncCallback\<boolean> | Yes | Callback used to return whether the ability is enabled. If the ability is enabled, **true** will be returned; otherwise, **false** will be returned. |
**Example**
......@@ -741,13 +741,13 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ---------- | ------ | ---- | ------------ |
| bundleName | string | Yes | Bundle name of the application.|
| bundleName | string | Yes | Bundle name of the application. |
**Return value**
| Type | Description |
| ----------------- | ------------------------- |
| Promise\<boolean> | Promise used to return whether the ability is enabled. If the ability is enabled, **true** will be returned; otherwise, **false** will be returned.|
| Promise\<boolean> | Promise used to return whether the ability is enabled. If the ability is enabled, **true** will be returned; otherwise, **false** will be returned. |
**Example**
......@@ -780,7 +780,7 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ---------- | ----------------------- | ---- | --------------- |
| bundleName | string | Yes | Bundle name of the application. |
| callback | AsyncCallback\<boolean> | Yes | Callback used to return whether the ability is enabled. If the ability is enabled, **true** will be returned; otherwise, **false** will be returned.|
| callback | AsyncCallback\<boolean> | Yes | Callback used to return whether the ability is enabled. If the ability is enabled, **true** will be returned; otherwise, **false** will be returned. |
**Example**
......@@ -814,14 +814,14 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ----------- | ------ | ---- | ------------------------------------- |
| want | Want | Yes | Want that contains the bundle name. |
| bundleFlags | number | Yes | Ability information to be returned. The default value is **0**. The value must be greater than or equal to 0.|
| bundleFlags | number | Yes | Ability information to be returned. The default value is **0**. The value must be greater than or equal to 0. |
| userId | number | No | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0. |
**Return value**
| Type | Description |
| ---------------------------- | --------------------- |
| Promise\<Array\<AbilityInfo>>| Promise used to return the ability information.|
| Promise\<Array\<AbilityInfo>>| Promise used to return the ability information. |
**Example**
......@@ -857,7 +857,7 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ----------- | ---------------------------------- | ---- | ------------------------------------- |
| want | Want | Yes | Want that contains the bundle name. |
| bundleFlags | number | Yes | Ability information to be returned. The default value is **0**. The value must be greater than or equal to 0.|
| bundleFlags | number | Yes | Ability information to be returned. The default value is **0**. The value must be greater than or equal to 0. |
| userId | number | Yes | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0. |
| callback | AsyncCallback<Array\<AbilityInfo>> | Yes | Callback used to return the ability information. |
......@@ -894,7 +894,7 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ----------- | ---------------------------------- | ---- | ------------------------------------- |
| want | Want | Yes | Want that contains the bundle name. |
| bundleFlags | number | Yes | Ability information to be returned. The default value is **0**. The value must be greater than or equal to 0.|
| bundleFlags | number | Yes | Ability information to be returned. The default value is **0**. The value must be greater than or equal to 0. |
| callback | AsyncCallback<Array\<AbilityInfo>> | Yes | Callback used to return the ability information. |
**Example**
......@@ -934,12 +934,12 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ---------- | ------ | ---- | ------------ |
| bundleName | string | Yes | Bundle name of the application.|
| bundleName | string | Yes | Bundle name of the application. |
**Return value**
| Type | Description |
| -------------- | -------------------------------------- |
| Promise\<Want> | Promise used to return the **Want** object.|
| Promise\<Want> | Promise used to return the **Want** object. |
**Example**
......@@ -972,7 +972,7 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ---------- | -------------------- | ---- | ------------------------------ |
| bundleName | string | Yes | Bundle name of the application. |
| callback | AsyncCallback\<Want> | Yes | Callback used to return the **Want** object.|
| callback | AsyncCallback\<Want> | Yes | Callback used to return the **Want** object. |
**Example**
......@@ -1002,12 +1002,12 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| ---- | ------ | ---- | -------- |
| uid | number | Yes | UID based on which the bundle name is to obtain.|
| uid | number | Yes | UID based on which the bundle name is to obtain. |
**Return value**
| Type | Description |
| ---------------- | --------------------------------- |
| Promise\<string> | Promise used to return the bundle name.|
| Promise\<string> | Promise used to return the bundle name. |
**Example**
......@@ -1036,7 +1036,7 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| -------- | ---------------------- | ---- | ------------------------- |
| uid | number | Yes | UID based on which the bundle name is to obtain. |
| callback | AsyncCallback\<string> | Yes | Callback used to return the bundle name.|
| callback | AsyncCallback\<string> | Yes | Callback used to return the bundle name. |
**Example**
......@@ -1076,7 +1076,7 @@ SystemCapability.BundleManager.BundleFramework
**Return value**
| Type | Description |
| --------------------- | ------------------------------------------------------------ |
| Promise\<image.PixelMap> | Promise used to return the [PixelMap](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-image.md)>.|
| Promise\<image.PixelMap> | Promise used to return the [PixelMap](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-image.md)>. |
**Example**
......@@ -1111,7 +1111,7 @@ SystemCapability.BundleManager.BundleFramework
| ----------- | ---------------------------------------- | ---- | ---------------------------------------- |
| bundleName | string | Yes | Bundle name based on which the pixel map is to obtain. |
| abilityName | string | Yes | Ability name based on which the pixel map is to obtain. |
| callback | AsyncCallback\<image.PixelMap> | Yes | Callback used to return the [PixelMap](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-image.md)>.|
| callback | AsyncCallback\<image.PixelMap> | Yes | Callback used to return the [PixelMap](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-image.md)>. |
**Example**
......@@ -1147,14 +1147,14 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| -------------- | ------ | ---- | ---------------------------------------- |
| want | Want | Yes | Want that contains the bundle name. |
| extensionFlags | number | Yes | Extension ability information to be returned. The default value is **0**. The value must be greater than or equal to 0.|
| extensionFlags | number | Yes | Extension ability information to be returned. The default value is **0**. The value must be greater than or equal to 0. |
| userId | number | No | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0. |
**Return value**
| Type | Description |
| ------------------------------------- | ------------------------------ |
| Promise<Array\<ExtensionAbilityInfo>> | Promise used to return the Extension ability information.|
| Promise<Array\<ExtensionAbilityInfo>> | Promise used to return the Extension ability information. |
**Example**
......@@ -1194,7 +1194,7 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| -------------- | ---------------------------------------- | ---- | ---------------------------------------- |
| want | Want | Yes | Want that contains the bundle name. |
| extensionFlags | number | Yes | Extension ability information to be returned. The default value is **0**. The value must be greater than or equal to 0.|
| extensionFlags | number | Yes | Extension ability information to be returned. The default value is **0**. The value must be greater than or equal to 0. |
| userId | number | Yes | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0. |
| callback | AsyncCallback<Array\<ExtensionAbilityInfo>> | Yes | Callback used to return the Extension ability information. |
......@@ -1235,7 +1235,7 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| -------------- | ---------------------------------------- | ---- | ---------------------------------------- |
| want | Want | Yes | Want that contains the bundle name. |
| extensionFlags | number | Yes | Extension ability information to be returned. The default value is **0**. The value must be greater than or equal to 0.|
| extensionFlags | number | Yes | Extension ability information to be returned. The default value is **0**. The value must be greater than or equal to 0. |
| callback | AsyncCallback<Array\<ExtensionAbilityInfo>> | Yes | Callback used to return the Extension ability information. |
**Example**
......@@ -1262,8 +1262,8 @@ bundle.queryExtensionAbilityInfosByWant(want, extensionFlags, (err, data) => {
| Name | Readable/Writable| Type | Mandatory | Description |
| ----------- | ---- | ------ | ---- | ---------------------------------------- |
| deviceId | Read-only | string | No | ID of the device that runs the ability. |
| bundleName | Read-only | string | Yes | Bundle name of the ability. If both **bundleName** and **abilityName** are specified in a **Want**, the **Want** can directly match the specified ability.|
| abilityName | Read-only | string | Yes | Name of the ability. If both **bundleName** and **abilityName** are specified in a **Want**, the **Want** can directly match the specified ability.|
| bundleName | Read-only | string | Yes | Bundle name of the ability. If both **bundleName** and **abilityName** are specified in a **Want**, the **Want** can directly match the specified ability. |
| abilityName | Read-only | string | Yes | Name of the ability. If both **bundleName** and **abilityName** are specified in a **Want**, the **Want** can directly match the specified ability. |
| uri | Read-only | string | No | Resource ID. |
| shortName | Read-only | string | No | Short name of the **ElementName**. |
......@@ -1309,9 +1309,9 @@ Enumerates bundle flags.
| GET_APPLICATION_INFO_WITH_PERMISSION | 0x00000008 | Obtains the application information with the permission information. |
| GET_BUNDLE_WITH_REQUESTED_PERMISSION | 0x00000010 | Obtains the bundle information with the information about the required permissions. |
| GET_ABILITY_INFO_WITH_METADATA<sup>8+</sup> | 0x00000020 | Obtains the ability metadata information. |
| GET_BUNDLE_WITH_EXTENSION_ABILITY<sup>9+</sup> | 0x00000020 | Obtains the bundle information with the Extension ability information.|
| GET_BUNDLE_WITH_EXTENSION_ABILITY<sup>9+</sup> | 0x00000020 | Obtains the bundle information with the Extension ability information. |
| GET_APPLICATION_INFO_WITH_METADATA<sup>8+</sup> | 0x00000040 | Obtains the application metadata information. |
| GET_ABILITY_INFO_SYSTEMAPP_ONLY<sup>8+</sup> | 0x00000080 | Obtains the ability information with information about system applications.|
| GET_ABILITY_INFO_SYSTEMAPP_ONLY<sup>8+</sup> | 0x00000080 | Obtains the ability information with information about system applications. |
| GET_ABILITY_INFO_WITH_DISABLE<sup>8+</sup> | 0x00000100 | Obtains information about disabled abilities. |
| GET_APPLICATION_INFO_WITH_DISABLE<sup>8+</sup> | 0x00000200 | Obtains information about disabled applications. |
| GET_ALL_APPLICATION_INFO | 0xFFFF0000 | Obtains all application information. |
......@@ -1324,7 +1324,7 @@ Describes the bundle options.
| Name | Type | Readable | Writable | Description |
| ------ | ------ | ---- | ---- | ---------------------------- |
| userId | number | Yes | Yes | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0.|
| userId | number | Yes | Yes | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0. |
## BundleInfo
......@@ -1343,7 +1343,7 @@ Describes the application bundle information.
| appInfo | ApplicationInfo | Yes | No | Application configuration information. |
| abilityInfos | Array\<AbilityInfo> | Yes | No | Ability configuration information. |
| reqPermissions | Array\<string> | Yes | No | Array of the permissions to request from the system. |
| reqPermissionDetails | Array\<ReqPermissionDetail> | Yes | No | Detailed information of the permissions to request from the system.|
| reqPermissionDetails | Array\<ReqPermissionDetail> | Yes | No | Detailed information of the permissions to request from the system. |
| vendor | string | Yes | No | Vendor of the bundle. |
| versionCode | number | Yes | No | Version number of the bundle. |
| versionName | string | Yes | No | Version description of the bundle. |
......@@ -1376,7 +1376,7 @@ Describes the application information.
| labelId | string | Yes | No | Application label ID. |
| icon | string | Yes | No | Application icon. |
| iconId | string | Yes | No | Application icon ID. |
| process | string | Yes | No | Process in which the application runs. If this parameter is not set, the bundle name is used by default.|
| process | string | Yes | No | Process in which the application runs. If this parameter is not set, the bundle name is used by default. |
| supportedModes | number | Yes | No | Running modes supported by the application. |
| moduleSourceDirs | Array\<string> | Yes | No | Relative paths for storing application resources. |
| permissions | Array\<string> | Yes | No | Permissions required for accessing the application. |
......@@ -1398,8 +1398,8 @@ Describes the module information of the application.
| Name | Type | Readable | Writable | Description |
| --------------- | ------ | ---- | ---- | ---- |
| moduleName | string | Yes | No | Module name.|
| moduleSourceDir | string | Yes | No | Installation directory.|
| moduleName | string | Yes | No | Module name. |
| moduleSourceDir | string | Yes | No | Installation directory. |
## CustomizeData
......@@ -1409,7 +1409,7 @@ Describes the custom metadata.
| Name | Type | Readable | Writable | Description |
| ------------------ | ------ | ---- | ---- | -------- |
| name | string | Yes | Yes | Custom metadata name.|
| name | string | Yes | Yes | Custom metadata name. |
| value | string | Yes | Yes | Custom metadata value. |
| extra<sup>8+</sup> | string | Yes | Yes | Custom resources. |
......@@ -1438,7 +1438,7 @@ Describes the HAP module information.
| mainAbilityName | string | Yes | No | Name of the entry ability. |
| installationFree | boolean | Yes | No | Whether installation-free is supported. |
| mainElementName<sup>9+</sup> | string | Yes | No | Information about the entry ability. |
| extensionAbilityInfo<sup>9+</sup> | Array\<ExtensionAbilityInfo> | Yes | No | Extension ability information.|
| extensionAbilityInfo<sup>9+</sup> | Array\<ExtensionAbilityInfo> | Yes | No | Extension ability information. |
| metadata<sup>9+</sup> | Array\<Metadata> | Yes | No | Metadata of the ability. |
## ReqPermissionDetail
......@@ -1451,7 +1451,7 @@ Describes the detailed information of the permissions to request from the system
| --------- | --------- | ---- | ---- | ---------- |
| name | string | Yes | Yes | Name of the permission to request. |
| reason | string | Yes | Yes | Reason for requesting the permission. |
| usedScene | UsedScene | Yes | Yes | Application scenario and timing for using the permission.|
| usedScene | UsedScene | Yes | Yes | Application scenario and timing for using the permission. |
## UsedScene
......@@ -1461,7 +1461,7 @@ Describes the application scenario and timing for using the permission.
| Name | Type | Readable | Writable | Description |
| --------- | -------------- | ---- | ---- | ---------------- |
| abilities | Array\<string> | Yes | Yes | Abilities that use the permission.|
| abilities | Array\<string> | Yes | Yes | Abilities that use the permission. |
| when | string | Yes | Yes | Time when the permission is used. |
......@@ -1481,7 +1481,7 @@ Describes the ability information.
| descriptionId | number | Yes | No | Ability description ID. |
| iconId | number | Yes | No | Ability icon ID. |
| moduleName | string | Yes | No | Name of the HAP file to which the ability belongs. |
| process | string | Yes | No | Process in which this ability runs. If this parameter is not set, the bundle name is used by default.|
| process | string | Yes | No | Process in which this ability runs. If this parameter is not set, the bundle name is used by default. |
| targetAbility | string | Yes | No | Target ability that the ability alias points to. |
| backgroundModes | number | Yes | No | Background service mode of the ability. |
| isVisible | boolean | Yes | No | Whether the ability can be called by other applications. |
......@@ -1489,7 +1489,7 @@ Describes the ability information.
| type | AbilityType | Yes | No | Ability type. |
| orientation | DisplayOrientation | Yes | No | Ability display orientation. |
| launchMode | LaunchMode | Yes | No | Ability launch mode. |
| permissions | Array\<string> | Yes | No | Permissions required for other applications to call the ability.|
| permissions | Array\<string> | Yes | No | Permissions required for other applications to call the ability. |
| deviceTypes | Array\<string> | Yes | No | Device types supported by the ability. |
| deviceCapabilities | Array\<string> | Yes | No | Device capabilities required for the ability. |
| readPermission | string | Yes | No | Permission required for reading the ability data. |
......@@ -1513,7 +1513,7 @@ Enumerates ability types.
| UNKNOWN | None | Unknown ability type. |
| PAGE | None | Ability that has a UI. |
| SERVICE | None | Ability that does not have a UI. |
| DATA | None | Ability that is used to provide data access services.|
| DATA | None | Ability that is used to provide data access services. |
## DisplayOrientation
......@@ -1526,7 +1526,7 @@ Enumerates display orientations.
| UNSPECIFIED | None | The system automatically determines the display orientation. |
| LANDSCAPE | None | Landscape orientation. |
| PORTRAIT | None | Portrait orientation. |
| FOLLOW_RECENT | None | The page ability orientation is the same as that of the nearest ability in the stack.|
| FOLLOW_RECENT | None | The page ability orientation is the same as that of the nearest ability in the stack. |
## LaunchMode
......@@ -1536,7 +1536,7 @@ Enumerates launch modes.
| Name | Type | Description |
| --------- | ---- | ------------- |
| SINGLETON | 0 | The ability has only one instance.|
| SINGLETON | 0 | The ability has only one instance. |
| STANDARD | 1 | The ability can have multiple instances. |
## AbilitySubType
......@@ -1548,7 +1548,7 @@ Enumerates ability subtypes.
| Name | Type | Description |
| ----------- | ---- | -------------------- |
| UNSPECIFIED | 0 | Undefined ability subtype. |
| CA | 1 | Ability that has a UI.|
| CA | 1 | Ability that has a UI. |
## ExtensionAbilityType<sup>9+</sup>
......@@ -1560,12 +1560,12 @@ Enumerates Extension ability types.
| Name | Type | Description |
| ------------------------------ | ---- | ------------------------- |
| FORM<sup>9+</sup> | 0 | Form included. |
| WORK_SCHEDULER<sup>9+</sup> | 1 | Work scheduler included.|
| WORK_SCHEDULER<sup>9+</sup> | 1 | Work scheduler included. |
| INPUT_METHOD<sup>9+</sup> | 2 | Input method included. |
| SERVICE<sup>9+</sup> | 3 | Service included. |
| ACCESSIBILITY<sup>9+</sup> | 4 | Accessibility included. |
| DATA_SHARE<sup>9+</sup> | 5 | Data sharing included.|
| FILE_SHARE<sup>9+</sup> | 6 | File sharing included.|
| DATA_SHARE<sup>9+</sup> | 5 | Data sharing included. |
| FILE_SHARE<sup>9+</sup> | 6 | File sharing included. |
| STATIC_SUBSCRIBER<sup>9+</sup> | 7 | Subscribers included. |
| WALLPAPER<sup>9+</sup> | 8 | Wallpaper included. |
| UNSPECIFIED<sup>9+</sup> | 9 | Unspecified type. |
......@@ -1581,7 +1581,7 @@ Enumerates Extension flags.
| GET_EXTENSION_INFO_DEFAULT<sup>9+</sup> | 0x00000000 | Obtains the default Extension ability information. |
| GET_EXTENSION_INFO_WITH_PERMISSION<sup>9+</sup> | 0x00000002 | Obtains the Extension ability information that carries permission information. |
| GET_EXTENSION_INFO_WITH_APPLICATION<sup>9+</sup> | 0x00000004 | Obtains the Extension ability information that carries application information. |
| GET_EXTENSION_INFO_WITH_METADATA<sup>9+</sup> | 0x00000020 | Obtains the Extension ability information that carries metadata information.|
| GET_EXTENSION_INFO_WITH_METADATA<sup>9+</sup> | 0x00000020 | Obtains the Extension ability information that carries metadata information. |
## ColorMode
......@@ -1592,9 +1592,9 @@ Enumerates color modes.
| Name | Type | Description |
| ---------- | ---- | ---- |
| AUTO_MODE | -1 | Automatic mode.|
| DARK_MODE | 0 | Dark mode.|
| LIGHT_MODE | 1 | Light mode.|
| AUTO_MODE | -1 | Automatic mode. |
| DARK_MODE | 0 | Dark mode. |
| LIGHT_MODE | 1 | Light mode. |
## GrantStatus
......@@ -1605,7 +1605,7 @@ Enumerates permission grant statuses.
| Name | Type | Description |
| ------------------ | ---- | ---- |
| PERMISSION_DENIED | -1 | Permission denied.|
| PERMISSION_DENIED | -1 | Permission denied. |
| PERMISSION_GRANTED | 0 | Permission granted. |
......@@ -1625,7 +1625,7 @@ Describes the Extension ability information.
| iconId<sup>9+</sup> | number | Yes | No | Icon ID of the Extension ability. |
| isVisible<sup>9+</sup> | boolean | Yes | No | Whether the Extension ability can be called by other applications. |
| extensionAbilityType<sup>9+</sup> | bundle.ExtensionAbilityType | Yes | No | Type of the Extension ability. |
| permissions<sup>9+</sup> | Array\<string> | Yes | No | Permissions required for other applications to call the Extension ability.|
| permissions<sup>9+</sup> | Array\<string> | Yes | No | Permissions required for other applications to call the Extension ability. |
| applicationInfo<sup>9+</sup> | ApplicationInfo | Yes | No | Application configuration information. |
| metaData<sup>9+</sup> | Array\<Metadata> | Yes | No | Metadata of the Extension ability. |
| enabled<sup>9+</sup> | boolean | Yes | No | Whether the Extension ability is enabled. |
......@@ -1641,6 +1641,6 @@ Describes the metadata information.
| Name | Type | Readable | Writable | Description |
| --------------------- | ------ | ---- | ---- | ----- |
| name<sup>9+</sup> | string | Yes | Yes | Metadata name.|
| name<sup>9+</sup> | string | Yes | Yes | Metadata name. |
| value<sup>9+</sup> | string | Yes | Yes | Metadata value. |
| resource<sup>9+</sup> | string | Yes | Yes | Metadata resource.|
| resource<sup>9+</sup> | string | Yes | Yes | Metadata resource. |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册