提交 24e51bdd 编写于 作者: G Gloria

Update bundle APIs against multiple PRs

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 71cd4d77
# BundleStatusCallback
The **BundleStatusCallback** module provides bundle callback information, which is obtained through [innerBundleManager.on](js-apis-Bundle-InnerBundleManager.md).
The **BundleStatusCallback** module provides callbacks for bundle status changes. The changes can be obtained through [innerBundleManager.on](js-apis-Bundle-InnerBundleManager.md).
> **NOTE**
>
> This module is deprecated since API version 9. You are advised to use [bundleMonitor](js-apis-bundleMonitor.md) instead.
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## BundleStatusCallback<sup>(deprecated)<sup>
......
# @ohos.bundle.innerBundleManager
# @ohos.bundle.innerBundleManager (innerBundleManager)
The **innerBundleManager** module provides APIs for the **Home Screen** application.
......@@ -22,7 +22,7 @@ SystemCapability.BundleManager.BundleFramework
getLauncherAbilityInfos(bundleName: string, userId: number, callback: AsyncCallback&lt;Array&lt;LauncherAbilityInfo&gt;&gt;) : void;
Obtains the launcher ability information based on a given bundle name. This API uses an asynchronous callback to return the result.
> This API is deprecated since API version 9. You are advised to use [launcherBundleManager#getLauncherAbilityInfo](js-apis-launcherBundleManager.md) instead.
> This API is deprecated since API version 9. You are advised to use [launcherBundleManager.getLauncherAbilityInfo](js-apis-launcherBundleManager.md#launcherbundlemanagergetlauncherabilityinfo9) instead.
**Required permissions**
......@@ -38,11 +38,11 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
| Name | Type | Mandatory| Description |
| ---------- | ------------------------------------------------------------ | ---- | ----------------------------------------------------- |
| bundleName | string | Yes | Bundle name of an application. |
| userId | number | Yes | User ID. The value must be greater than or equal to 0.|
| callback | AsyncCallback\<Array<[LauncherAbilityInfo](js-apis-bundle-LauncherAbilityInfo.md)>> | Yes | Callback used to return an array of the launcher ability information. |
| Name | Type | Mandatory| Description |
| ---------- | ------------------------------------------------------------ | ---- | ------------------------------------------ |
| bundleName | string | Yes | Bundle name. |
| userId | number | Yes | User ID. The value must be greater than or equal to 0. |
| callback | AsyncCallback\<Array<[LauncherAbilityInfo](js-apis-bundle-LauncherAbilityInfo.md)>> | Yes | Callback used to return an array of the launcher ability information.|
## innerBundleManager.getLauncherAbilityInfos<sup>(deprecated)</sup>
......@@ -50,7 +50,7 @@ This is a system API and cannot be called by third-party applications.
getLauncherAbilityInfos(bundleName: string, userId: number) : Promise&lt;Array&lt;LauncherAbilityInfo&gt;&gt;
Obtains the launcher ability information based on a given bundle name. This API uses a promise to return the result.
> This API is deprecated since API version 9. You are advised to use [launcherBundleManager#getLauncherAbilityInfo](js-apis-launcherBundleManager.md) instead.
> This API is deprecated since API version 9. You are advised to use [launcherBundleManager.getLauncherAbilityInfo](js-apis-launcherBundleManager.md#launcherbundlemanagergetlauncherabilityinfo9) instead.
**Required permissions**
......@@ -66,9 +66,9 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
| Name | Type | Mandatory| Description |
| ---------- | ------ | ---- | ----------------------------------------------------- |
| bundleName | string | Yes | Bundle name of an application. |
| Name | Type | Mandatory| Description |
| ---------- | ------ | ---- | ----------------------------- |
| bundleName | string | Yes | Bundle name. |
| userId | number | Yes | User ID. The value must be greater than or equal to 0.|
**Return value**
......@@ -82,7 +82,7 @@ This is a system API and cannot be called by third-party applications.
on(type:"BundleStatusChange", bundleStatusCallback : BundleStatusCallback, callback: AsyncCallback&lt;string&gt;) : void;
Registers a callback to receive bundle status changes. This API uses an asynchronous callback to return the result.
> This API is deprecated since API version 9. You are advised to use [bundleMonitor#on](js-apis-bundleMonitor.md) instead.
> This API is deprecated since API version 9. You are advised to use [bundleMonitor.on](js-apis-bundleMonitor.md#bundlemonitoron) instead.
**Required permissions**
......@@ -109,7 +109,7 @@ This is a system API and cannot be called by third-party applications.
on(type:"BundleStatusChange", bundleStatusCallback : BundleStatusCallback) : Promise&lt;string&gt;
Registers a callback to receive bundle status changes. This API uses a promise to return the result.
> This API is deprecated since API version 9. You are advised to use [bundleMonitor#on](js-apis-bundleMonitor.md) instead.
> This API is deprecated since API version 9. You are advised to use [bundleMonitor.on](js-apis-bundleMonitor.md#bundlemonitoron) instead.
**Required permissions**
......@@ -141,7 +141,7 @@ This is a system API and cannot be called by third-party applications.
off(type:"BundleStatusChange", callback: AsyncCallback&lt;string&gt;) : void;
Deregisters the callback that receives bundle status changes. This API uses an asynchronous callback to return the result.
> This API is deprecated since API version 9. You are advised to use [bundleMonitor#off](js-apis-bundleMonitor.md) instead.
> This API is deprecated since API version 9. You are advised to use [bundleMonitor.off](js-apis-bundleMonitor.md#bundlemonitoroff) instead.
**Required permissions**
......@@ -167,7 +167,7 @@ This is a system API and cannot be called by third-party applications.
off(type:"BundleStatusChange") : Promise&lt;string&gt;
Deregisters the callback that receives bundle status changes. This API uses a promise to return the result.
> This API is deprecated since API version 9. You are advised to use [bundleMonitor#off](js-apis-bundleMonitor.md) instead.
> This API is deprecated since API version 9. You are advised to use [bundleMonitor.off](js-apis-bundleMonitor.md#bundlemonitoroff) instead.
**Required permissions**
......@@ -198,7 +198,7 @@ This is a system API and cannot be called by third-party applications.
getAllLauncherAbilityInfos(userId: number, callback: AsyncCallback&lt;Array&lt;LauncherAbilityInfo&gt;&gt;) : void;
Obtains the information about all launcher abilities. This API uses an asynchronous callback to return the result.
> This API is deprecated since API version 9. You are advised to use [launcherBundleManager#getAllLauncherAbilityInfo](js-apis-launcherBundleManager.md) instead.
> This API is deprecated since API version 9. You are advised to use [launcherBundleManager.getAllLauncherAbilityInfo](js-apis-launcherBundleManager.md#launcherbundlemanagergetalllauncherabilityinfo9) instead.
**Required permissions**
......@@ -224,7 +224,7 @@ This is a system API and cannot be called by third-party applications.
getAllLauncherAbilityInfos(userId: number) : Promise&lt;Array&lt;LauncherAbilityInfo&gt;&gt;
Obtains the information about all launcher abilities. This API uses a promise to return the result.
> This API is deprecated since API version 9. You are advised to use [launcherBundleManager#getAllLauncherAbilityInfo](js-apis-launcherBundleManager.md) instead.
> This API is deprecated since API version 9. You are advised to use [launcherBundleManager.getAllLauncherAbilityInfo](js-apis-launcherBundleManager.md#launcherbundlemanagergetalllauncherabilityinfo9) instead.
**Required permissions**
......@@ -255,7 +255,7 @@ This is a system API and cannot be called by third-party applications.
getShortcutInfos(bundleName :string, callback: AsyncCallback&lt;Array&lt;ShortcutInfo&gt;&gt;) : void;
Obtains the shortcut information based on a given bundle name. This API uses an asynchronous callback to return the result.
> This API is deprecated since API version 9. You are advised to use [launcherBundleManager#getShortcutInfo](js-apis-launcherBundleManager.md) instead.
> This API is deprecated since API version 9. You are advised to use [launcherBundleManager.getShortcutInfo](js-apis-launcherBundleManager.md#launcherbundlemanagergetshortcutinfo9) instead.
**Required permissions**
......@@ -273,7 +273,7 @@ This is a system API and cannot be called by third-party applications.
| Name | Type | Mandatory| Description |
| ---------- | ------------------------------------------------------------ | ---- | ---------------------------------------------- |
| bundleName | string | Yes | Bundle name of an application. |
| bundleName | string | Yes | Bundle name. |
| callback | AsyncCallback\<Array<[ShortcutInfo](js-apis-bundle-ShortcutInfo.md)>> | Yes | Callback used to return an array of the shortcut information.|
## innerBundleManager.getShortcutInfos<sup>(deprecated)</sup>
......@@ -281,7 +281,7 @@ This is a system API and cannot be called by third-party applications.
getShortcutInfos(bundleName : string) : Promise&lt;Array&lt;ShortcutInfo&gt;&gt;
Obtains the shortcut information based on a given bundle name. This API uses a promise to return the result.
> This API is deprecated since API version 9. You are advised to use [launcherBundleManager#getShortcutInfo](js-apis-launcherBundleManager.md) instead.
> This API is deprecated since API version 9. You are advised to use [launcherBundleManager.getShortcutInfo](js-apis-launcherBundleManager.md#launcherbundlemanagergetshortcutinfo9) instead.
**Required permissions**
......@@ -299,7 +299,7 @@ This is a system API and cannot be called by third-party applications.
| Name | Type | Mandatory| Description |
| ---------- | ------ | ---- | ------------------------ |
| bundleName | string | Yes | Bundle name of an application.|
| bundleName | string | Yes | Bundle name.|
**Return value**
......
# distributedBundle
# @ohos.distributedBundle (Distributed Bundle Management)
The **distributedBundle** module manages distributed bundles.
......@@ -26,7 +26,7 @@ For details, see [Permission Levels](../../security/accesstoken-overview.md#perm
## distributedBundle.getRemoteAbilityInfo<sup>deprecated<sup>
> This API is deprecated since API version 9. You are advised to use [getRemoteAbilityInfo](js-apis-distributedBundle.md) instead.
> This API is deprecated since API version 9. You are advised to use [getRemoteAbilityInfo(@ohos.bundle.distributedBundleManager)](js-apis-distributedBundleManager.md) instead.
getRemoteAbilityInfo(elementName: ElementName, callback: AsyncCallback&lt;RemoteAbilityInfo&gt;): void;
......@@ -55,7 +55,7 @@ This is a system API and cannot be called by third-party applications.
## distributedBundle.getRemoteAbilityInfo<sup>deprecated<sup>
> This API is deprecated since API version 9. You are advised to use [getRemoteAbilityInfo](js-apis-distributedBundle.md) instead.
> This API is deprecated since API version 9. You are advised to use [getRemoteAbilityInfo(@ohos.bundle.distributedBundleManager)](js-apis-distributedBundleManager.md) instead.
getRemoteAbilityInfo(elementName: ElementName): Promise&lt;RemoteAbilityInfo&gt;
......@@ -87,7 +87,7 @@ This is a system API and cannot be called by third-party applications.
## distributedBundle.getRemoteAbilityInfos<sup>deprecated<sup>
> This API is deprecated since API version 9. You are advised to use [getRemoteAbilityInfo](js-apis-distributedBundle.md) instead.
> This API is deprecated since API version 9. You are advised to use [getRemoteAbilityInfo(@ohos.bundle.distributedBundleManager)](js-apis-distributedBundleManager.md) instead.
getRemoteAbilityInfos(elementNames: Array&lt;ElementName&gt;, callback: AsyncCallback&lt;Array&lt;RemoteAbilityInfo&gt;&gt;): void;
......@@ -116,7 +116,7 @@ This is a system API and cannot be called by third-party applications.
## distributedBundle.getRemoteAbilityInfos<sup>deprecated<sup>
> This API is deprecated since API version 9. You are advised to use [getRemoteAbilityInfo](js-apis-distributedBundle.md) instead.
> This API is deprecated since API version 9. You are advised to use [getRemoteAbilityInfo(@ohos.bundle.distributedBundleManager)](js-apis-distributedBundleManager.md) instead.
getRemoteAbilityInfos(elementNames: Array&lt;ElementName&gt;): Promise&lt;Array&lt;RemoteAbilityInfo&gt;&gt;
......
# AbilityInfo
The **AbilityInfo** module provides information about an ability. Unless otherwise specified, the information is obtained through [GET_BUNDLE_DEFAULT](js-apis-Bundle.md).
The **AbilityInfo** module provides information about an ability. Unless otherwise specified, the information is obtained through [bundle.getAbilityInfo](js-apis-Bundle.md#bundlegetabilityinfodeprecated).
> **NOTE**
>
......@@ -12,32 +12,32 @@ The **AbilityInfo** module provides information about an ability. Unless otherwi
**System capability**: SystemCapability.BundleManager.BundleFramework
| Name | Type | Readable| Writable| Description |
| --------------------- | -------------------------------------------------------- | ---- | ---- | ----------------------------------------- |
| bundleName | string | Yes | No | Bundle name. |
| name | string | Yes | No | Ability name. |
| label | string | Yes | No | Ability name visible to users. |
| description | string | Yes | No | Ability description. |
| icon | string | Yes | No | Index of the ability icon resource file. |
| 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 the ability runs. If this parameter is not set, the bundle name is used.|
| targetAbility | string | Yes | No | Target ability that the ability alias points to.<br>This attribute can be used only in the FA model.|
| backgroundModes | number | Yes | No | Background service mode of the ability.<br>This attribute can be used only in the FA model. |
| isVisible | boolean | Yes | No | Whether the ability can be called by other bundles. |
| formEnabled | boolean | Yes | No | Whether the ability provides the service widget capability.<br>This attribute can be used only in the FA model.|
| type | AbilityType | Yes | No | Ability type.<br>This attribute can be used only in the FA model. |
| orientation | [DisplayOrientation](js-apis-Bundle.md#displayorientationdeprecated) | Yes | No | Ability display orientation. |
| launchMode | [LaunchMode](js-apis-Bundle.md#launchmodedeprecated) | Yes | No | Ability launch mode. |
| permissions | Array\<string> | Yes | No | Permissions required for other applications to call the ability.<br>The value is obtained by passing **GET_ABILITY_INFO_WITH_PERMISSION**.|
| 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.<br>This attribute can be used only in the FA model.|
| writePermission | string | Yes | No | Permission required for writing data to the ability.<br>This attribute can be used only in the FA model.|
| applicationInfo | [ApplicationInfo](js-apis-bundle-ApplicationInfo.md) | Yes | No | Application configuration information.<br>The value is obtained by passing [GET_ABILITY_INFO_WITH_APPLICATION](js-apis-Bundle.md).|
| uri | string | Yes | No | URI of the ability.<br>This attribute can be used only in the FA model.|
| labelId | number | Yes | No | Ability label ID. |
| subType | AbilitySubType | Yes | No | Subtype of the template that can be used by the ability.<br>This attribute can be used only in the FA model.|
| metadata<sup>8+</sup> | Array\<[CustomizeData](js-apis-bundle-CustomizeData.md)> | Yes | No | Metadata of the ability.<br>The value is obtained by passing **GET_ABILITY_INFO_WITH_METADATA**.|
| enabled<sup>8+</sup> | boolean | Yes | No | Whether the ability is enabled. |
| Name | Type | Readable| Writable| Description |
| --------------------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------------------------------------ |
| bundleName | string | Yes | No | Bundle name. |
| name | string | Yes | No | Ability name. |
| label | string | Yes | No | Ability name visible to users. |
| description | string | Yes | No | Ability description. |
| icon | string | Yes | No | Index of the ability icon resource file. |
| descriptionId | number | Yes | No | ID of the ability description. |
| iconId | number | Yes | No | ID of the ability icon. |
| moduleName | string | Yes | No | Name of the HAP file to which the ability belongs. |
| process | string | Yes | No | Process in which the ability runs. If this parameter is not set, the bundle name is used. |
| targetAbility | string | Yes | No | Target ability that the ability alias points to.<br>This attribute can be used only in the FA model.|
| backgroundModes | number | Yes | No | Background service mode of the ability.<br>This attribute can be used only in the FA model. |
| isVisible | boolean | Yes | No | Whether the ability can be called by other bundles. |
| formEnabled | boolean | Yes | No | Whether the ability provides the service widget capability.<br>This attribute can be used only in the FA model.|
| type | AbilityType | Yes | No | Ability type.<br>This attribute can be used only in the FA model. |
| orientation | [DisplayOrientation](js-apis-Bundle.md#displayorientationdeprecated) | Yes | No | Ability display orientation. |
| launchMode | [LaunchMode](js-apis-Bundle.md#launchmodedeprecated) | Yes | No | Ability launch mode. |
| permissions | Array\<string> | Yes | No | Permissions required for other applications to call the ability.<br>The value is obtained by passing in GET_ABILITY_INFO_WITH_PERMISSION to [bundle.getAbilityInfo](js-apis-Bundle.md#bundlegetabilityinfodeprecated).|
| 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.<br>This attribute can be used only in the FA model. |
| writePermission | string | Yes | No | Permission required for writing data to the ability.<br>This attribute can be used only in the FA model. |
| applicationInfo | [ApplicationInfo](js-apis-bundle-ApplicationInfo.md) | Yes | No | Application configuration information.<br>The value is obtained by passing in GET_ABILITY_INFO_WITH_APPLICATION to [bundle.getAbilityInfo](js-apis-Bundle.md#bundlegetabilityinfodeprecated).|
| uri | string | Yes | No | URI of the ability.<br>This attribute can be used only in the FA model.|
| labelId | number | Yes | No | ID of the ability label. |
| subType | AbilitySubType | Yes | No | Subtype of the template that can be used by the ability.<br>This attribute can be used only in the FA model.|
| metadata<sup>8+</sup> | Array\<[CustomizeData](js-apis-bundle-CustomizeData.md)> | Yes | No | Metadata of the ability.<br>The value is obtained by passing in GET_ABILITY_INFO_WITH_METADATA to [bundle.getAbilityInfo](js-apis-Bundle.md#bundlegetabilityinfodeprecated).|
| enabled<sup>8+</sup> | boolean | Yes | No | Whether the ability is enabled. |
# ApplicationInfo
The **ApplicationInfo** module provides application information. Unless otherwise specified, the information is obtained through [GET_BUNDLE_DEFAULT](js-apis-Bundle.md).
The **ApplicationInfo** module provides application information. Unless otherwise specified, the information is obtained through [bundle.getApplicationInfo](js-apis-Bundle.md#bundlegetapplicationinfodeprecated).
> **NOTE**
>
......@@ -16,21 +16,21 @@ The **ApplicationInfo** module provides application information. Unless otherwis
|----------------------------|------------------------------------------------------------------------|-----|-----|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| name | string | Yes | No | Application name. |
| description | string | Yes | No | Application description. |
| descriptionId | number | Yes | No | Application description ID. |
| descriptionId | number | Yes | No | ID of the application description. |
| systemApp | boolean | Yes | No | Whether the application is a system application. The default value is **false**. |
| enabled | boolean | Yes | No | Whether the application is enabled. The default value is **true**. |
| label | string | Yes | No | Application label. |
| labelId | string | Yes | No | Application label ID. |
| labelId | string | Yes | No | ID of the application label. |
| icon | string | Yes | No | Application icon. |
| iconId | string | Yes | No | Application icon ID. |
| iconId | string | Yes | No | ID of the application icon. |
| process | string | Yes | No | Process in which the application runs. If this parameter is not set, the bundle name is used. |
| supportedModes | number | Yes | No | Modes supported by the application. Currently, only the **drive** mode is defined. This attribute applies only to head units. |
| supportedModes | number | Yes | No | Modes supported by the application. Currently, only the **drive** mode is defined. This attribute applies only to telematics devices. |
| moduleSourceDirs | Array\<string> | Yes | No | Relative paths for storing application resources. |
| permissions | Array\<string> | Yes | No | Permissions required for accessing the application.<br>The value is obtained by passing [GET_APPLICATION_INFO_WITH_PERMISSION](js-apis-Bundle.md). |
| permissions | Array\<string> | Yes | No | Permissions required for accessing the application.<br>The value is obtained by passing in GET_APPLICATION_INFO_WITH_PERMISSION to [bundle.getApplicationInfo](js-apis-Bundle.md#bundlegetapplicationinfodeprecated). |
| moduleInfos | Array\<[ModuleInfo](js-apis-bundle-ModuleInfo.md)> | Yes | No | Application module information. |
| entryDir | string | Yes | No | Path for storing application files. |
| codePath<sup>8+</sup> | string | Yes | No | Installation directory of the application. |
| metaData<sup>8+</sup> | Map\<string, Array\<[CustomizeData](js-apis-bundle-CustomizeData.md)>> | Yes | No | Custom metadata of the application.<br>The value is obtained by passing [GET_APPLICATION_INFO_WITH_METADATA](js-apis-Bundle.md). |
| metaData<sup>8+</sup> | Map\<string, Array\<[CustomizeData](js-apis-bundle-CustomizeData.md)>> | Yes | No | Custom metadata of the application.<br>The value is obtained by passing in GET_APPLICATION_INFO_WITH_METADATA to [bundle.getApplicationInfo](js-apis-Bundle.md#bundlegetapplicationinfodeprecated). |
| removable<sup>8+</sup> | boolean | Yes | No | Whether the application is removable. |
| accessTokenId<sup>8+</sup> | number | Yes | No | Access token ID of the application. |
| uid<sup>8+</sup> | number | Yes | No | UID of the application. |
......
# BundleInfo
The **BundleInfo** module provides bundle information. Unless otherwise specified, the information is obtained through [GET_BUNDLE_DEFAULT](js-apis-Bundle.md).
The **BundleInfo** module defines the bundle information, which can be obtained through [bundle.getBundleInfo](js-apis-Bundle.md#bundlegetbundleinfodeprecated).
> **NOTE**
>
......@@ -10,33 +10,33 @@ The **BundleInfo** module provides bundle information. Unless otherwise specifie
> This API is deprecated since API version 9. You are advised to use [bundleManager-BundleInfo](js-apis-bundleManager-bundleInfo.md) instead.
**System capability**: SystemCapability.BundleManager.BundleFramework
| Name | Type | Readable| Writable| Description |
| --------------------------------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------------------------------------ |
| name | string | Yes | No | Bundle name. |
| type | string | Yes | No | Bundle type. |
| appId | string | Yes | No | ID of the application to which the bundle belongs. |
| uid | number | Yes | No | UID of the application to which the bundle belongs. |
| installTime | number | Yes | No | Time when the HAP file was installed. |
| updateTime | number | Yes | No | Time when the HAP file was updated. |
| appInfo | [ApplicationInfo](js-apis-bundle-ApplicationInfo.md) | Yes | No | Application configuration information. |
| abilityInfos | Array\<[AbilityInfo](js-apis-bundle-AbilityInfo.md)> | Yes | No | Ability configuration information.<br>The value is obtained by passing **GET_BUNDLE_WITH_ABILITIES**.|
| reqPermissions | Array\<string> | Yes | No | Permissions to request from the system for running the application.<br>The value is obtained by passing **GET_BUNDLE_WITH_REQUESTED_PERMISSION**.|
| reqPermissionDetails | Array\<[ReqPermissionDetail](#reqpermissiondetaildeprecated)> | Yes | No | Detailed information of the permissions to request from the system.<br>The value is obtained by passing **GET_BUNDLE_WITH_REQUESTED_PERMISSION**.|
| 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. |
| compatibleVersion | number | Yes | No | Earliest SDK version required for running the bundle. |
| targetVersion | number | Yes | No | Latest SDK version required for running the bundle. |
| isCompressNativeLibs | boolean | Yes | No | Whether to compress the native library of the bundle. The default value is **true**. |
| hapModuleInfos | Array\<[HapModuleInfo](js-apis-bundle-HapModuleInfo.md)> | Yes | No | Module configuration information. |
| entryModuleName | string | Yes | No | Name of the entry module. |
| cpuAbi | string | Yes | No | CPU and ABI information of the bundle. |
| isSilentInstallation | string | Yes | No | Whether the application can be installed in silent mode. |
| minCompatibleVersionCode | number | Yes | No | Earliest version compatible with the bundle in the distributed scenario. |
| entryInstallationFree | boolean | Yes | No | Whether installation-free is supported for the entry module. |
| reqPermissionStates<sup>8+</sup> | Array\<number> | Yes | No | Permission grant state. The value **0** means that the request is successful, and **-1** means the opposite. |
**System capability**: SystemCapability.BundleManager.BundleFramework
| Name | Type | Readable| Writable| Description |
| -------------------------------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------------------------------------ |
| name | string | Yes | No | Bundle name. |
| type | string | Yes | No | Bundle type. |
| appId | string | Yes | No | ID of the application to which the bundle belongs. |
| uid | number | Yes | No | UID of the application to which the bundle belongs. |
| installTime | number | Yes | No | Time when the HAP file was installed. |
| updateTime | number | Yes | No | Time when the HAP file was updated. |
| appInfo | [ApplicationInfo](js-apis-bundle-ApplicationInfo.md) | Yes | No | Application configuration information. |
| abilityInfos | Array\<[AbilityInfo](js-apis-bundle-AbilityInfo.md)> | Yes | No | Ability configuration information.<br>The value is obtained by passing in GET_BUNDLE_WITH_ABILITIES to [bundle.getBundleInfo](js-apis-Bundle.md#bundlegetbundleinfodeprecated).|
| reqPermissions | Array\<string> | Yes | No | Permissions to request from the system for running the application.<br>The value is obtained by passing in GET_BUNDLE_WITH_REQUESTED_PERMISSION to [bundle.getBundleInfo](js-apis-Bundle.md#bundlegetbundleinfodeprecated).|
| reqPermissionDetails | Array\<[ReqPermissionDetail](#reqpermissiondetaildeprecated)> | Yes | No | Detailed information of the permissions to request from the system.<br>The value is obtained by passing in GET_BUNDLE_WITH_REQUESTED_PERMISSION to [bundle.getBundleInfo](js-apis-Bundle.md#bundlegetbundleinfodeprecated).|
| 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. |
| compatibleVersion | number | Yes | No | Earliest SDK version required for running the bundle. |
| targetVersion | number | Yes | No | Latest SDK version required for running the bundle. |
| isCompressNativeLibs | boolean | Yes | No | Whether to compress the native library of the bundle. The default value is **true**. |
| hapModuleInfos | Array\<[HapModuleInfo](js-apis-bundle-HapModuleInfo.md)> | Yes | No | Module configuration information. |
| entryModuleName | string | Yes | No | Name of the entry module. |
| cpuAbi | string | Yes | No | CPU and ABI information of the bundle. |
| isSilentInstallation | string | Yes | No | Whether the application can be installed in silent mode. |
| minCompatibleVersionCode | number | Yes | No | Earliest version compatible with the bundle in the distributed scenario. |
| entryInstallationFree | boolean | Yes | No | Whether installation-free is supported for the entry module. |
| reqPermissionStates<sup>8+</sup> | Array\<number> | Yes | No | Permission grant state. The value **0** means that the request is successful, and **-1** means the opposite. |
......
......@@ -8,7 +8,7 @@ The **BundleInstaller** module provides APIs for you to install, uninstall, and
## BundleInstaller.install<sup>(deprecated)<sup>
> This API is deprecated since API version 9. You are advised to use [install](js-apis-installer.md) instead.
> This API is deprecated since API version 9. You are advised to use [@ohos.bundle.installer.install](js-apis-installer.md) instead.
install(bundleFilePaths: Array&lt;string&gt;, param: InstallParam, callback: AsyncCallback&lt;InstallStatus&gt;): void;
......@@ -26,10 +26,10 @@ SystemCapability.BundleManager.BundleFramework
**Parameters**
| Name | Type | Mandatory| Description |
| --------------- | ---------------------------------------------------- | ---- | ------------------------------------------------------------ |
| bundleFilePaths | Array&lt;string&gt; | Yes | Sandbox path where the HAP files of the bundle are stored. For details about how to obtain the sandbox path, see [Obtaining the Sandbox Path](#obtaining-the-sandbox-path).|
| param | [InstallParam](#installparamdeprecated) | Yes | Parameters required for bundle installation. |
| Name | Type | Mandatory| Description |
| --------------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| bundleFilePaths | Array&lt;string&gt; | Yes | Sandbox path where the HAP files of the bundle are stored. For details about how to obtain the sandbox path, see [Obtaining the Sandbox Path](#obtaining-the-sandbox-path).|
| param | [InstallParam](#installparamdeprecated) | Yes | Parameters required for bundle installation. |
| callback | AsyncCallback&lt;[InstallStatus](#installstatusdeprecated)&gt; | Yes | Callback used to return the installation status. |
**Example**
......@@ -43,7 +43,7 @@ let installParam = {
installFlag: 1,
};
bundle.getBundleInstaller().then(installer=>{
bundle.getBundleInstaller().then(installer => {
installer.install(hapFilePaths, installParam, err => {
if (err) {
console.error('install failed:' + JSON.stringify(err));
......@@ -76,10 +76,10 @@ SystemCapability.BundleManager.BundleFramework
**Parameters**
| Name | Type | Mandatory| Description |
| ---------- | ---------------------------------------------------- | ---- | ---------------------------------------------- |
| bundleName | string | Yes | Bundle name. |
| param | [InstallParam](#installparamdeprecated) | Yes | Parameters required for bundle uninstall. |
| Name | Type | Mandatory| Description |
| ---------- | ------------------------------------------------------------ | ---- | ---------------------------------------------- |
| bundleName | string | Yes | Bundle name. |
| param | [InstallParam](#installparamdeprecated) | Yes | Parameters required for bundle uninstall. |
| callback | AsyncCallback&lt;[InstallStatus](#installstatusdeprecated)&gt; | Yes | Callback used to return the installation status.|
**Example**
......@@ -93,7 +93,7 @@ let installParam = {
installFlag: 1,
};
bundle.getBundleInstaller().then(installer=>{
bundle.getBundleInstaller().then(installer => {
installer.uninstall(bundleName, installParam, err => {
if (err) {
console.error('uninstall failed:' + JSON.stringify(err));
......@@ -125,10 +125,10 @@ SystemCapability.BundleManager.BundleFramework
**Parameters**
| Name | Type | Mandatory| Description |
| ---------- | ---------------------------------------------------- | ---- | ---------------------------------------------- |
| bundleName | string | Yes | Bundle name. |
| param | [InstallParam](#installparamdeprecated) | Yes | Parameters required for bundle recovery. |
| Name | Type | Mandatory| Description |
| ---------- | ------------------------------------------------------------ | ---- | -------------------------------------------------- |
| bundleName | string | Yes | Bundle name. |
| param | [InstallParam](#installparamdeprecated) | Yes | Parameters required for bundle recovery. |
| callback | AsyncCallback&lt;[InstallStatus](#installstatusdeprecated)&gt; | Yes | Callback used to return the recovery status.|
**Example**
......@@ -143,7 +143,7 @@ let installParam = {
installFlag: 1,
};
bundle.getBundleInstaller().then(installer=>{
bundle.getBundleInstaller().then(installer => {
installer.recover(bundleName, installParam, err => {
if (err) {
console.error('recover failed:' + JSON.stringify(err));
......@@ -166,9 +166,9 @@ Describes the parameters required for bundle installation, recovery, or uninstal
| Name | Type | Readable| Writable| Description |
| ----------- | ------- | ---- | ---- | ------------------ |
| userId | number | Yes | No | User ID. |
| installFlag | number | Yes | No | Installation flag. |
| isKeepData | boolean | Yes | No | Whether data is kept.|
| userId | number | Yes | Yes | User ID. The default value is the user ID of the caller.|
| installFlag | number | Yes | Yes | Installation flag.<br>**1** (default): overwrite installation.<br>**16**: installation-free.|
| isKeepData | boolean | Yes | Yes | Whether data is kept. The default value is **false**.|
## InstallStatus<sup>(deprecated)<sup>
......@@ -180,17 +180,17 @@ Describes the bundle installation or uninstall status.
| Name | Type | Readable| Writable| Description |
| ------------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------ |
| status | bundle.[InstallErrorCode](js-apis-Bundle.md#installerrorcode) | Yes | No | Installation or uninstall error code. |
| statusMessage | string | Yes | No | Installation or uninstall status message.|
| status | bundle.[InstallErrorCode](js-apis-Bundle.md#installerrorcode) | Yes | No | Installation or uninstall error code. The value must be defined in [InstallErrorCode](js-apis-Bundle.md#installerrorcode). |
| statusMessage | string | Yes | No | Installation or uninstall status message. <br>**SUCCESS**: install_succeed<br>**STATUS_INSTALL_FAILURE**: Installation failed (no installation file exists).<br>**STATUS_INSTALL_FAILURE_ABORTED**: Installation aborted.<br>**STATUS_INSTALL_FAILURE_INVALID**: Invalid installation parameter.<br>**STATUS_INSTALL_FAILURE_CONFLICT**: Installation conflict. (The basic information of the application to update is inconsistent with that of the existing application.)<br>**STATUS_INSTALL_FAILURE_STORAGE**: Failed to store the bundle information.<br>**STATUS_INSTALL_FAILURE_INCOMPATIBLE**: Installation incompatibility. (A downgrade occurs or the signature information is incorrect.)<br>**STATUS_UNINSTALL_FAILURE**: Uninstallation failed. (The application to be uninstalled is not found.)<br>**STATUS_UNINSTALL_FAILURE_ABORTED**: Uninstallation aborted. (This error code is not in use.)<br>**STATUS_UNINSTALL_FAILURE_ABORTED**: Uninstallation conflict. (Failed to uninstall a system application or end the application process.)<br>**STATUS_INSTALL_FAILURE_DOWNLOAD_TIMEOUT**: Installation failed. (Download timed out.)<br>**STATUS_INSTALL_FAILURE_DOWNLOAD_FAILED**: Installation failed. (Download failed.)<br>**STATUS_RECOVER_FAILURE_INVALID**: Failed to restore the pre-installed application.<br>**STATUS_ABILITY_NOT_FOUND**: Ability not found.<br>**STATUS_BMS_SERVICE_ERROR**: BMS service error.<br>**STATUS_FAILED_NO_SPACE_LEFT**: Insufficient device space.<br>**STATUS_GRANT_REQUEST_PERMISSIONS_FAILED**: Application authorization failed.<br>**STATUS_INSTALL_PERMISSION_DENIED**: No installation permission.<br>**STATUS_UNINSTALL_PERMISSION_DENIED**: No uninstallation permission. |
## Obtaining the Sandbox Path
For the FA model, the sandbox path of a bundle can be obtained using the APIs in [Context](js-apis-inner-app-context.md). For the sage model, the sandbox path can be obtained using the attribute in [Context](js-apis-ability-context.md#abilitycontext). The following describes how to obtain the sandbox path.
For the FA model, the sandbox path of a bundle can be obtained using the APIs in [Context](js-apis-inner-app-context.md). For the stage model, the sandbox path can be obtained using the attribute in [Context](js-apis-ability-context.md#abilitycontext). The following describes how to obtain the sandbox path.
**Example**
``` ts
// Stage model
import Ability from '@ohos.application.Ability';
class MainAbility extends Ability {
import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
onWindowStageCreate(windowStage) {
let context = this.context;
let pathDir = context.filesDir;
......
......@@ -17,7 +17,7 @@ Describes the element name information, which identifies the basic information a
| Name | Type | Readable| Writable| Description |
| ----------------------- | ---------| ---- | ---- | ------------------------- |
| deviceId | string | Yes | Yes | Device ID. |
| bundleName | string | Yes | Yes | Bundle name of the application. |
| abilityName | string | Yes | Yes | Name of the ability. |
| bundleName | string | Yes | Yes | Bundle name. |
| abilityName | string | Yes | Yes | Ability name. |
| uri | string | Yes | Yes | Resource ID. |
| shortName | string | Yes | Yes | Short name of the ability. |
# HapModuleInfo
The **HapModuleInfo** module provides information about an HAP module. Unless otherwise specified, the information is obtained through [GET_BUNDLE_DEFAULT](js-apis-Bundle.md).
The **HapModuleInfo** module provides information about an HAP module. Unless otherwise specified, the information is obtained through [bundle.getBundleInfo](js-apis-Bundle.md#bundlegetbundleinfodeprecated).
> **NOTE**
>
......
......@@ -8,7 +8,7 @@ The **LauncherAbilityInfo** module provides information about the launcher abili
## LauncherAbilityInfo<sup>(deprecated)<sup>
> This API is deprecated since API version 9. You are advised to use [LauncherAbilityInfo](js-apis-bundleManager-launcherAbilityInfo.md) instead.
> This API is deprecated since API version 9. You are advised to use [bundleManager-LauncherAbilityInfo](js-apis-bundleManager-launcherAbilityInfo.md) instead.
**System capability**: SystemCapability.BundleManager.BundleFramework
......@@ -18,7 +18,7 @@ The **LauncherAbilityInfo** module provides information about the launcher abili
| --------------- | ---------------------------------------------------- | ---- | ---- | -------------------------------------- |
| applicationInfo | [ApplicationInfo](js-apis-bundle-ApplicationInfo.md) | Yes | No | Application information of the launcher ability.|
| elementName | [ElementName](js-apis-bundle-ElementName.md) | Yes | No | Element name of the launcher ability. |
| labelId | number | Yes | No | Label ID of the launcher ability. |
| iconId | number | Yes | No | Icon ID of the launcher ability. |
| userId | number | Yes | No | User ID of the launcher ability. |
| labelId | number | Yes | No | ID of the launcher ability label. |
| iconId | number | Yes | No | ID of the launcher ability icon. |
| userId | number | Yes | No | ID of the launcher ability user. |
| installTime | number | Yes | No | Time when the launcher ability is installed. |
......@@ -10,6 +10,7 @@ The **ModuleInfo** module provides module information of an application.
> This API is deprecated since API version 9. You are advised to use [bundleManager-HapModuleInfo](js-apis-bundleManager-hapModuleInfo.md) instead.
**System capability**: SystemCapability.BundleManager.BundleFramework
| Name | Type | Readable| Writable| Description |
| --------------- | ------ | ---- | ---- | -------- |
| moduleName | string | Yes | No | Module name.|
......
......@@ -18,5 +18,5 @@ The **PermissionDef** module provides permission details defined in the configur
| -------------- | ------ | ---- | ---- | -------------- |
| permissionName | string | Yes | No | Name of the permission. |
| grantMode | number | Yes | No | Grant mode of the permission. The value **0** means that the system automatically grants the permission after the application installation, and **1** means that the application needs to dynamically request the permission from the user.|
| labelId | number | Yes | No | Label ID of the permission. |
| descriptionId | number | Yes | No | Description ID of the permission. |
| labelId | number | Yes | No | ID of the permission label. |
| descriptionId | number | Yes | No | ID of the permission description. |
......@@ -10,9 +10,9 @@ The **shortcutInfo** module defines shortcut information configured in the confi
> This API is deprecated since API version 9. You are advised to use [bundleManager-ShortcutWant](js-apis-bundleManager-shortcutInfo.md) instead.
**System capability**: SystemCapability.BundleManager.BundleFramework
**System capability**: SystemCapability.BundleManager.BundleFramework
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API and cannot be called by third-party applications.
| Name | Type | Readable| Writable| Description |
| ------------------------- | ------ | ---- | ---- | -------------------- |
......@@ -23,13 +23,12 @@ The **shortcutInfo** module defines shortcut information configured in the confi
> This API is deprecated since API version 9. You are advised to use [bundleManager-ShortcutInfo](js-apis-bundleManager-shortcutInfo.md) instead.
**System capability**: SystemCapability.BundleManager.BundleFramework
**System capability**: SystemCapability.BundleManager.BundleFramework
| Name | Type | Readable| Writable| Description |
| ----------------------- | ------------------------------------------ | ---- | ---- | ---------------------------- |
| id | string | Yes | No | ID of the application to which the shortcut belongs. |
| bundleName | string | Yes | No | Name of the bundle that contains the shortcut. |
| bundleName | string | Yes | No | Name of the bundle that contains the shortcut.|
| hostAbility | string | Yes | No | Local ability information of the shortcut. |
| icon | string | Yes | No | Icon of the shortcut. |
| iconId<sup>8+</sup> | number | Yes | No | Icon ID of the shortcut. |
......@@ -40,5 +39,3 @@ The **shortcutInfo** module defines shortcut information configured in the confi
| isStatic | boolean | Yes | No | Whether the shortcut is static. |
| isHomeShortcut | boolean | Yes | No | Whether the shortcut is a home shortcut.|
| isEnabled | boolean | Yes | No | Whether the shortcut is enabled. |
<!--no_check-->
\ No newline at end of file
......@@ -19,3 +19,4 @@ The **RemoteAbilityInfo** module provides information about a remote ability.
| elementName | [ElementName](js-apis-bundle-ElementName.md) | Yes | No | Element name information of the ability. |
| label | string | Yes | No | Ability name. |
| icon | string | Yes | No | Icon of the ability.|
# AbilityInfo
The **AbilityInfo** module provides information about an ability. Unless otherwise specified, the information is obtained through [GET_ABILITY_INFO_DEFAULT](js-apis-bundleManager.md).
The **AbilityInfo** module defines the ability information. A system application can obtain the ability information through [bundleManager.queryAbilityInfo](js-apis-bundleManager.md#bundlemanagerqueryabilityinfo). The input parameter [abilityFlags](js-apis-bundleManager.md#abilityflag) specifies the information to be contained in the returned [AbilityInfo](js-apis-bundleManager-abilityInfo.md) object.
> **NOTE**
>
......@@ -8,31 +8,31 @@ The **AbilityInfo** module provides information about an ability. Unless otherwi
## AbilityInfo
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Type | Readable| Writable| Description |
| --------------------- | -------------------------------------------------------- | ---- | ---- | ----------------------------------------- |
| bundleName | string | Yes | No | Bundle name. |
| moduleName | string | Yes | No | Name of the HAP file to which the ability belongs. |
| --------------------- | -------------------------------------------------------- | ---- | ---- | ------------------------------------------ |
| bundleName | string | Yes | No | Bundle name. |
| moduleName | string | Yes | No | Name of the HAP file to which the ability belongs. |
| name | string | Yes | No | Ability name. |
| label | string | Yes | No | Ability name visible to users. |
| labelId | number | Yes | No | ID of the ability label. |
| labelId | number | Yes | No | ID of the ability label. |
| description | string | Yes | No | Ability description. |
| descriptionId | number | Yes | No | ID of the ability description. |
| icon | string | Yes | No | Index of the ability icon resource file. |
| iconId | number | Yes | No | ID of the ability icon. |
| process | string | Yes | No | Process in which the ability runs. If this parameter is not set, the bundle name is used.|
| isVisible | boolean | Yes | No | Whether the ability can be called by other bundles. |
| type | [AbilityType](js-apis-bundleManager.md#abilitytype) | Yes | No | Ability type.<br>This attribute can be used only in the FA model. |
| type | [AbilityType](js-apis-bundleManager.md#abilitytype) | Yes | No | Ability type.<br>This attribute can be used only in the FA model.|
| orientation | [DisplayOrientation](js-apis-bundleManager.md#displayorientation) | Yes | No | Ability display orientation. |
| launchType | [LaunchType](js-apis-bundleManager.md#launchtype) | Yes | No | Ability launch mode. |
| permissions | Array\<string> | Yes | No | Permissions required for other bundles to call the ability. The information is obtained by using **GET_ABILITY_INFO_WITH_PERMISSION**.|
| permissions | Array\<string> | Yes | No | Permissions required for other applications to call the ability. The permissions can be obtained by passing in **GET_ABILITY_INFO_WITH_PERMISSION** to the **abilityFlags** parameter of [bundleManager.queryAbilityInfo](js-apis-bundleManager.md#bundlemanagerqueryabilityinfo).|
| readPermission | string | Yes | No | Permission required for reading the ability data.<br>This attribute can be used only in the FA model.|
| writePermission | string | Yes | No | Permission required for writing data to the ability.<br>This attribute can be used only in the FA model.|
| uri | string | Yes | No | URI of the ability.<br>This attribute can be used only in the FA model.|
| deviceTypes | Array\<string> | Yes | No | Device types supported by the ability. |
| applicationInfo | [ApplicationInfo](js-apis-bundleManager-applicationInfo.md) | Yes | No | Application information. The information is obtained by using **GET_ABILITY_INFO_WITH_APPLICATION**.|
| metadata | Array\<[Metadata](js-apis-bundleManager-metadata.md)> | Yes | No | Metadata of the ability. The information is obtained by using **GET_ABILITY_INFO_WITH_METADATA**.|
| applicationInfo | [ApplicationInfo](js-apis-bundleManager-applicationInfo.md) | Yes | No | Application information. The information can be obtained by passing in **GET_ABILITY_INFO_WITH_APPLICATION** to the **abilityFlags** parameter of [bundleManager.queryAbilityInfo](js-apis-bundleManager.md#bundlemanagerqueryabilityinfo).|
| metadata | Array\<[Metadata](js-apis-bundleManager-metadata.md)> | Yes | No | Metadata of the ability. The information can be obtained by passing in **GET_ABILITY_INFO_WITH_METADATA** to the **abilityFlags** parameter of [bundleManager.queryAbilityInfo](js-apis-bundleManager.md#bundlemanagerqueryabilityinfo).|
| enabled | boolean | Yes | No | Whether the ability is enabled. |
| supportWindowModes | Array\<[SupportWindowMode](js-apis-bundleManager.md#supportwindowmode)> | Yes | No | Window modes supported by the ability. |
| windowSize|[WindowSize](#windowsize) | Yes | No | Window size.|
......@@ -41,7 +41,7 @@ The **AbilityInfo** module provides information about an ability. Unless otherwi
Describes the window size.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Type | Readable| Writable| Description |
| -------------------| ------- | ---- | ---- | ---------------------------------- |
......@@ -50,4 +50,4 @@ Describes the window size.
| maxWindowWidth | number | Yes | No | Maximum width of the window in free window mode. The unit is vp.|
| minWindowWidth | number | Yes | No | Minimum width of the window in free window mode. The unit is vp.|
| maxWindowHeight | number | Yes | No | Maximum height of the window in free window mode. The unit is vp.|
| minWindowHeight | number | Yes | No | Maximum height of the window in free window mode. The unit is vp.|
| minWindowHeight | number | Yes | No | Minimum height of the window in free window mode. The unit is vp.|
# ApplicationInfo
The **ApplicationInfo** module provides information about an application. Unless otherwise specified, the information is obtained through [GET_APPLICATION_INFO_DEFAULT](js-apis-bundleManager.md).
The **ApplicationInfo** module defines the application information. A system application can obtain its own or others' application information through [bundleManager.getApplicationInfo](js-apis-bundleManager.md#bundlemanagergetapplicationinfo). The input parameter [appFlags](js-apis-bundleManager.md#applicationflag) specifies the information to be contained in the returned [ApplicationInfo](js-apis-bundleManager-applicationInfo.md) object.
> **NOTE**
>
......@@ -9,21 +9,21 @@ The **ApplicationInfo** module provides information about an application. Unless
## ApplicationInfo
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Type | Readable| Writable| Description |
| -------------------------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------------------------------------ |
| name | string | Yes | No | Application name. |
| description | string | Yes | No | Application description. |
| descriptionId | number | Yes | No | ID of the application description. |
| descriptionId | number | Yes | No | ID of the application description. |
| enabled | boolean | Yes | No | Whether the application is enabled. The default value is **true**. |
| label | string | Yes | No | Application label. |
| labelId | number | Yes | No | ID of the application label. |
| labelId | number | Yes | No | ID of the application label. |
| icon | string | Yes | No | Application icon. |
| iconId | number | Yes | No | ID of the application icon. |
| iconId | number | Yes | No | ID of the application icon. |
| process | string | Yes | No | Process in which the application runs. If this parameter is not set, the bundle name is used. |
| permissions | Array\<string> | Yes | No | Permissions required for accessing the application. The information is obtained by using **GET_APPLICATION_INFO_WITH_PERMISSION**.|
| entryDir | string | Yes | No | Path for storing application files. |
| permissions | Array\<string> | Yes | No | Permissions required for accessing the application. The permissions can be obtained by passing in **GET_APPLICATION_INFO_WITH_PERMISSION** to the **appFlags** parameter of [bundleManager.getApplicationInfo](js-apis-bundleManager.md#bundlemanagergetapplicationinfo).|
| codePath | string | Yes | No | Installation directory of the application. |
| metadata | Map\<string, Array\<[Metadata](js-apis-bundleManager-metadata.md)>> | Yes | No | Metadata of the application. The information is obtained by using **GET_APPLICATION_INFO_WITH_METADATA**.|
| metadata | Map\<string, Array\<[Metadata](js-apis-bundleManager-metadata.md)>> | Yes | No | Metadata of the application. The information can be obtained by passing in **GET_APPLICATION_INFO_WITH_METADATA** to the **appFlags** parameter of [bundleManager.getApplicationInfo](js-apis-bundleManager.md#bundlemanagergetapplicationinfo).|
| removable | boolean | Yes | No | Whether the application is removable. |
| accessTokenId | number | Yes | No | Access token ID of the application. |
| uid | number | Yes | No | UID of the application. |
......@@ -32,3 +32,4 @@ The **ApplicationInfo** module provides information about an application. Unless
| descriptionResource | [Resource](js-apis-resource-manager.md#resource9) | Yes| No| Description resource of the application. |
| appDistributionType | string | Yes | No | Distribution type of the application signing certificate. The options are **app_gallery**, **enterprise**, **os_integration**, and **crowdtesting**. |
| appProvisionType | string | Yes | No | Type of the application signing certificate file. The options are **debug** and **release**. |
| systemApp | boolean | Yes | No | Whether the application is a system application. |
# BundleInfo
The **BundleInfo** module provides information about a bundle. Unless otherwise specified, the information is obtained through [GET_BUNDLE_INFO_DEFAULT](js-apis-bundle-bundleManager).
The **BundleInfo** module defines the bundle information. A system application can obtain its own or others' bundle information through [bundleManager.getBundleInfo](js-apis-bundleManager.md#bundlemanagergetbundleinfo). A third-party application can obtain its own bundle information through [getBundleInfoForSelf](js-apis-bundleManager.md#bundlemanagergetbundleinfoforself). The input parameter [bundleFlags](js-apis-bundleManager.md#bundleflag) specifies the information to be contained in the returned [BundleInfo](js-apis-bundleManager-bundleInfo.md) object.
> **NOTE**
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## BundleInfo
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Type | Readable| Writable| Description |
| --------------------------------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------------------------------------ |
| name | string | Yes | No | Bundle name. |
| vendor | string | Yes | No | Vendor of the bundle. |
| versionCode | number | Yes | No | Version number of the bundle. |
| versionCode | number | Yes | No | Version number of the bundle. |
| versionName | string | Yes | No | Version description of the bundle. |
| minCompatibleVersionCode | number | Yes | No | Earliest version compatible with the bundle in the distributed scenario. |
| targetVersion | number | Yes | No | Target API version required for running the bundle. |
| appInfo | [ApplicationInfo](js-apis-bundleManager-applicationInfo.md) | Yes | No | Application information. The information is obtained by using **GET_BUNDLE_INFO_WITH_APPLICATION**. |
| hapModulesInfo | Array\<[HapModuleInfo](js-apis-bundleManager-hapModuleInfo.md)> | Yes | No | Module configuration information. The information is obtained by using **GET_BUNDLE_INFO_WITH_HAP_MODULE**. |
| reqPermissionDetails | Array\<[ReqPermissionDetail](#reqpermissiondetail)> | Yes | No | Detailed information of the permissions to request from the system. The information is obtained by using **GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION**.|
| permissionGrantStates | Array\<[PermissionGrantState](js-apis-bundleManager.md#permissiongrantstate)> | Yes | No | Permission grant state. The information is obtained by using **GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION**. |
| signatureInfo | [SignatureInfo](#signatureinfo) | Yes | No | Signature information of the bundle. The information is obtained by using **GET_BUNDLE_INFO_WITH_SIGNATURE_INFO**. |
| appInfo | [ApplicationInfo](js-apis-bundleManager-applicationInfo.md) | Yes | No | Application information. The information can be obtained by passing in **GET_BUNDLE_INFO_WITH_APPLICATION** to the **bundleFlags** parameter of [bundleManager.getBundleInfo](js-apis-bundleManager.md#bundlemanagergetbundleinfo). |
| hapModulesInfo | Array\<[HapModuleInfo](js-apis-bundleManager-hapModuleInfo.md)> | Yes | No | Module configuration information. The information can be obtained by passing in **GET_BUNDLE_INFO_WITH_HAP_MODULE** to the **bundleFlags** parameter of [bundleManager.getBundleInfo](js-apis-bundleManager.md#bundlemanagergetbundleinfo). |
| reqPermissionDetails | Array\<[ReqPermissionDetail](#reqpermissiondetail)> | Yes | No | Detailed information of the permissions to request from the system. The information can be obtained by passing in **GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION** to the **bundleFlags** parameter of [bundleManager.getBundleInfo](js-apis-bundleManager.md#bundlemanagergetbundleinfo).|
| permissionGrantStates | Array\<[PermissionGrantState](js-apis-bundleManager.md#permissiongrantstate)> | Yes | No | Permission grant state. The information can be obtained by passing in **GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION** to the **bundleFlags** parameter of [bundleManager.getBundleInfo](js-apis-bundleManager.md#bundlemanagergetbundleinfo). |
| signatureInfo | [SignatureInfo](#signatureinfo) | Yes | No | Signature information of the bundle. The information can be obtained by passing in **GET_BUNDLE_INFO_WITH_SIGNATURE_INFO** to the **bundleFlags** parameter of [bundleManager.getBundleInfo](js-apis-bundleManager.md#bundlemanagergetbundleinfo). |
| installTime | number | Yes | No | Time when the bundle was installed. |
| updateTime | number | Yes | No | Time when the bundle was updated. |
......@@ -31,12 +33,12 @@ The **BundleInfo** module provides information about a bundle. Unless otherwise
Provides the detailed information of the permissions to request from the system.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Type | Readable| Writable| Description |
| --------------------- | ----------------------- | ---- | ---- | ---------------------|
| name | string | Yes | Yes | Name of the permission to request. |
| reason | string | Yes | Yes | Reason for requesting the permission. |
| reason | string | Yes | Yes | Reason for requesting the permission. |
| reasonId | number | Yes | Yes | ID of the reason for requesting the permission.|
| usedScene | [UsedScene](#usedscene) | Yes | Yes | Application scenario and timing for using the permission.|
......@@ -46,7 +48,7 @@ Provides the detailed information of the permissions to request from the system.
Describes the application scenario and timing for using the permission.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Type | Readable| Writable| Description |
| --------- | -------------- | ---- | ---- | --------------------------- |
......@@ -57,7 +59,7 @@ Describes the application scenario and timing for using the permission.
Describes the signature information of the bundle.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Type | Readable| Writable| Description |
| --------- | -------------- | ---- | ---- | --------------------------- |
......
......@@ -2,7 +2,6 @@
The **ElementName** module provides element name information, which can be obtained through [Context.getElementName](js-apis-inner-app-context.md).
> **NOTE**
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
......@@ -14,7 +13,7 @@ The **ElementName** module provides element name information, which can be obtai
| Name | Type | Readable| Writable| Description |
| ----------------------- | ---------| ---- | ---- | ------------------------- |
| deviceId | string | Yes | Yes | Device ID. |
| bundleName | string | Yes | Yes | Bundle name of the application. |
| bundleName | string | Yes | Yes | Bundle name. |
| abilityName | string | Yes | Yes | Name of the ability. |
| uri | string | Yes | Yes | Resource ID. |
| shortName | string | Yes | Yes | Short name of the ability. |
......
# ExtensionAbilityInfo
The **ExtensionAbilityInfo** module provides information about an Extension ability. Unless otherwise specified, all attributes are obtained through [getBundleInfo](js-apis-bundleManager.md), and flags are obtained through [GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY](js-apis-bundleManager.md#bundleflag).
The **ExtensionAbilityInfo** module defines the ExtensionAbility information. A system application can obtain its own or others' ExtensionAbility information through [bundleManager.getBundleInfo](js-apis-bundleManager.md#bundlemanagergetbundleinfo). A third-party application can obtain its own ExtensionAbility information through [getBundleInfoForSelf](js-apis-bundleManager.md#bundlemanagergetbundleinfoforself). **GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY** must be passed in to the input parameter [bundleFlags](js-apis-bundleManager.md#bundleflag) to obtain the information.
> **NOTE**
>
......@@ -10,19 +10,19 @@ The **ExtensionAbilityInfo** module provides information about an Extension abil
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Type | Readable| Writable| Description |
| -------------------- | ----------------------------------------------------------- | ---- | ---- | -------------------------------------------------- |
| bundleName | string | Yes | No | Bundle name. |
| moduleName | string | Yes | No | Name of the HAP file to which the Extension ability belongs. |
| name | string | Yes | No | Name of the Extension ability. |
| labelId | number | Yes | No | Label ID of the Extension ability. |
| descriptionId | number | Yes | No | Description ID of the Extension ability. |
| iconId | number | Yes | No | Icon ID of the Extension ability. |
| isVisible | boolean | Yes | No | Whether the Extension ability can be called by other bundles. |
| extensionAbilityType | [ExtensionAbilityType](js-apis-bundleManager.md#extensionabilitytype) | Yes | No | Type of the Extension ability. |
| permissions | Array\<string> | Yes | No | Permissions required for other bundles to call the Extension ability.|
| applicationInfo | [ApplicationInfo](js-apis-bundleManager-applicationInfo.md) | Yes | No | Application information of the Extension ability. |
| metadata | Array\<[Metadata](js-apis-bundleManager-metadata.md)> | Yes | No | Metadata of the Extension ability. |
| enabled | boolean | Yes | No | Whether the Extension ability is enabled. |
| readPermission | string | Yes | No | Permission required for reading data from the Extension ability. |
| writePermission | string | Yes | No | Permission required for writing data to the Extension ability. |
| Name | Type | Readable| Writable| Description |
| -------------------- | ------------------------------------------------------------ | ---- | ---- | ---------------------------------------------------- |
| bundleName | string | Yes | No | Bundle name. |
| moduleName | string | Yes | No | Name of the HAP file to which the ExtensionAbility belongs. |
| name | string | Yes | No | Name of the ExtensionAbility. |
| labelId | number | Yes | No | ID of the ExtensionAbility label. |
| descriptionId | number | Yes | No | ID of the ExtensionAbility description. |
| iconId | number | Yes | No | ID of the ExtensionAbility icon. |
| isVisible | boolean | Yes | No | Whether the ExtensionAbility can be called by other bundles. |
| extensionAbilityType | [ExtensionAbilityType](js-apis-bundleManager.md#extensionabilitytype) | Yes | No | Type of the ExtensionAbility. |
| permissions | Array\<string> | Yes | No | Permissions required for other bundles to call the ExtensionAbility.|
| applicationInfo | [ApplicationInfo](js-apis-bundleManager-applicationInfo.md) | Yes | No | Application information. |
| metadata | Array\<[Metadata](js-apis-bundleManager-metadata.md)> | Yes | No | Metadata of the ExtensionAbility. |
| enabled | boolean | Yes | No | Whether the ExtensionAbility is enabled. |
| readPermission | string | Yes | No | Permission required for reading data from the ExtensionAbility. |
| writePermission | string | Yes | No | Permission required for writing data to the ExtensionAbility. |
# HapModuleInfo
The **HapModuleInfo** module defines the HAP module information. A system application can obtain its own or others' HAP module information through [bundleManager.getBundleInfo](js-apis-bundleManager.md#bundlemanagergetbundleinfo). A third-party application can obtain its own HAP module information through [getBundleInfoForSelf](js-apis-bundleManager.md#bundlemanagergetbundleinfoforself). **GET_BUNDLE_INFO_WITH_HAP_MODULE** must be passed in to the input parameter [bundleFlags](js-apis-bundleManager.md#bundleflag) to obtain the information.
> **NOTE**
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
......@@ -16,12 +18,11 @@
| label | string | Yes | No | Module label. |
| labelId | number | Yes | No | ID of the module label. |
| description | string | Yes | No | Module description. |
| descriptionId | number | Yes | No | ID of the module mescription. |
| descriptionId | number | Yes | No | ID of the module description. |
| mainElementName | string | Yes | No | Name of the main ability. |
| abilitiesInfo | Array\<[AbilityInfo](js-apis-bundleManager-abilityInfo.md)> | Yes | No | Ability information. |
| extensionAbilitiesInfo | Array\<[ExtensionAbilityInfo](js-apis-bundleManager-extensionAbilityInfo.md)> | Yes | No | Information about the Extension ability.|
| extensionAbilitiesInfo | Array\<[ExtensionAbilityInfo](js-apis-bundleManager-extensionAbilityInfo.md)> | Yes | No | ExtensionAbility information.|
| metadata | Array\<[Metadata](js-apis-bundleManager-metadata.md)> | Yes | No | Metadata of the ability. |
| deviceTypes | Array\<string> | Yes | No | Device types supported by the module. |
| deviceTypes | Array\<string> | Yes | No | Types of devices where the module can run. |
| installationFree | boolean | Yes | No | Whether installation-free is supported. |
| hashValue | string | Yes | No | Hash value of the module. |
| moduleSourceDir | string | Yes | No | Module path.|
# LauncherAbilityInfo
The **LauncherAbilityInfo** module defines the ability information of the home screen application. The information can be obtained through [bundleManager.getLauncherAbilityInfo](js-apis-launcherBundleManager.md#launcherbundlemanagergetlauncherabilityinfo9).
> **NOTE**
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## LauncherAbilityInfo
**System capability**: SystemCapability.BundleManager.BundleFramework.Launcher
......@@ -12,7 +16,7 @@
| --------------- | ----------------------------------------------------------- | ---- | ---- | ------------------------------------ |
| applicationInfo | [ApplicationInfo](js-apis-bundleManager-applicationInfo.md) | Yes | No | Application information of the launcher ability.|
| elementName | [ElementName](js-apis-bundleManager-elementName.md) | Yes | No | Element name of the launcher ability. |
| labelId | number | Yes | No | Label ID of the launcher ability. |
| iconId | number | Yes | No | Icon ID of the launcher ability. |
| userId | number | Yes | No | User ID of the launcher ability. |
| labelId | number | Yes | No | ID of the launcher ability label. |
| iconId | number | Yes | No | ID of the launcher ability icon. |
| userId | number | Yes | No | ID of the launcher ability user. |
| installTime | number | Yes | No | Time when the launcher ability was installed. |
# Metadata
The **metadata** module provides the configuration about the module, ability, and Extension ability. The value is of the array type. The configuration is valid only for the current module, ability, or Extension ability.
The **Metadata** module provides a metadata object, which can be obtained through [bundleManager.getBundleInfo](js-apis-bundleManager.md#bundlemanagergetbundleinfo). This object is contained in [ApplicationInfo](js-apis-bundleManager-applicationInfo.md), [HapModuleInfo](js-apis-bundleManager-hapModuleInfo.md), [AbilityInfo](js-apis-bundleManager-abilityInfo.md), and [ExtensionAbilityInfo](js-apis-bundleManager-extensionAbilityInfo.md).
> **NOTE**
>
The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
> The **Metadata** module provides the configuration about the module, UIAbility, and ExtensionAbility. The value is of the array type. The configuration is valid only for the current module, UIAbility, or ExtensionAbility.
## Metadata
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Type | Readable| Writable| Description |
| -------- | ------ | ---- | ---- | ---------- |
| name | string | Yes | Yes | Metadata name.|
......
......@@ -2,7 +2,6 @@
The **PackInfo** module provides information in the **pack.info** file. The information can be obtained using [freeInstall.getBundlePackInfo](js-apis-freeInstall.md).
> **NOTE**
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
......@@ -49,10 +48,10 @@ The **PackInfo** module provides information in the **pack.info** file. The info
**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall
| Name | Type | Readable| Writable| Description |
| ---------- | ------------------- | ---- | ---- | ---------------------------------- |
| bundleName | string | Yes | No | Bundle name. It uniquely identifies the application.|
| version | [Version](#version) | Yes | No | Bundle version. |
| Name | Type | Readable| Writable| Description |
| ---------- | ------------------- | ---- | ---- | -------------------------------------- |
| bundleName | string | Yes | No | Bundle name. It uniquely identifies an application.|
| version | [Version](#version) | Yes | No | Bundle version. |
## ModuleConfigInfo
......@@ -67,7 +66,7 @@ The **PackInfo** module provides information in the **pack.info** file. The info
| deviceType | Array\<string> | Yes | No | Device types supported by the module. |
| distro | [ModuleDistroInfo](#moduledistroinfo) | Yes | No | Distribution information of the module. |
| abilities | Array\<[ModuleAbilityInfo](#moduleabilityinfo)> | Yes | No | Ability information of the module. |
| extensionAbilities | Array\<[ExtensionAbilities](#extensionability)> | Yes | No | Extension ability information of the module.|
| extensionAbilities | Array\<[ExtensionAbilities](#extensionability)> | Yes | No | ExtensionAbility information of the module.|
## ModuleDistroInfo
......@@ -103,7 +102,7 @@ The **PackInfo** module provides information in the **pack.info** file. The info
| Name | Type | Readable| Writable| Description |
| ----- | ------------------------------------------- | ---- | ---- | ------------------------------------------------------------ |
| name | string | Yes| No| Name of the Extension ability.|
| name | string | Yes| No| Name of the ExtensionAbility.|
| forms | Array\<[AbilityFormInfo](#abilityforminfo)> | Yes | No | Widget information.|
## AbilityFormInfo
......@@ -132,7 +131,7 @@ The **PackInfo** module provides information in the **pack.info** file. The info
| ----------- | ------ | ---- | ---- | -------------------- |
| releaseType | string | Yes | No | Name of the API version. |
| compatible | number | Yes | No | Minimum API version.|
| target | number | Yes | No | Target API version. |
| target | number | Yes | No | Target API version. |
## Version
......
# PermissionDef
The **PermissionDef** module provides permission details defined in the configuration file. The information can be obtained using [bundleManager.getPermissionDef](js-apis-bundleManager.md).
The **PermissionDef** module provides permission details defined in the configuration file. The information can be obtained using [bundleManager.getPermissionDef](js-apis-bundleManager.md).
> **NOTE**
>
......@@ -16,5 +16,5 @@ The **PermissionDef** module provides permission details defined in the configur
| -------------- | ------ | ---- | ---- | -------------- |
| permissionName | string | Yes | No | Name of the permission. |
| grantMode | number | Yes | No | Grant mode of the permission.|
| labelId | number | Yes | No | Label ID of the permission. |
| descriptionId | number | Yes | No | Description ID of the permission. |
| labelId | number | Yes | No | ID of the permission label. |
| descriptionId | number | Yes | No | ID of the permission description. |
......@@ -17,7 +17,7 @@ The **ShortcutInfo** module defines shortcut information configured in the confi
| Name | Type | Readable| Writable| Description |
| ------------------------- | ------ | ---- | ---- | -------------------- |
| targetBundle | string | Yes | No | Target bundle name of the shortcut.|
| targetModule | string | Yes | No | Target module name of the shortcut. |
| targetModule | string | Yes | No | Target module name of the shortcut. |
| targetAbility | string | Yes | No | Target ability name of the shortcut.|
## ShortcutInfo
......@@ -28,14 +28,14 @@ The **ShortcutInfo** module defines shortcut information configured in the confi
| Name | Type | Readable| Writable| Description |
| ----------------------- | ------------------------------------------ | ---- | ---- | ---------------------------- |
| id | string | Yes | No | ID of the application to which the shortcut belongs. |
| bundleName | string | Yes | No | Name of the bundle that contains the shortcut. |
| moduleName | string | Yes | No | Module name of the shortcut. |
| hostAbility | string | Yes | No | Local ability name of the shortcut. |
| icon | string | Yes | No | Icon of the shortcut. |
| iconId | number | Yes | No | Icon ID of the shortcut. |
| label | string | Yes | No | Label of the shortcut. |
| labelId | number | Yes | No | Label ID of the shortcut. |
| wants | Array\<[ShortcutWant](#shortcutwant)> | Yes | No | Want information required for the shortcut. |
<!--no_check-->
\ No newline at end of file
| id | string | Yes | No | ID of the application to which the shortcut belongs. |
| bundleName | string | Yes | No | Name of the bundle that contains the shortcut.|
| moduleName | string | Yes | No | Module name of the shortcut. |
| hostAbility | string | Yes | No | Local ability name of the shortcut. |
| icon | string | Yes | No | Icon of the shortcut. |
| iconId | number | Yes | No | ID of the shortcut icon. |
| label | string | Yes | No | Label of the shortcut. |
| labelId | number | Yes | No | ID of the shortcut label. |
| wants | Array\<[ShortcutWant](#shortcutwant)> | Yes | No | Want information required for the shortcut. |
# @ohos.bundle.bundleManager
# @ohos.bundle.bundleManager (bundleManager)
The **bundleManager** module provides APIs for querying information about bundles, applications, abilities, Extension abilities, and more.
......
# @ohos.bundle.bundleMonitor
# @ohos.bundle.bundleMonitor (bundleMonitor)
The **Bundle.bundleMonitor** module provides APIs for listens for bundle installation, uninstall, and updates.
......@@ -33,7 +33,7 @@ For details, see [Permission Levels](../../security/accesstoken-overview.md).
## bundleMonitor.on
on(type: BundleChangedEvent, callback: Callback\<BundleChangedInfo>): void;
on(type: BundleChangedEvent, callback: callback\<BundleChangedInfo>): void;
Subscribes to bundle installation, uninstall, and update events.
......@@ -47,8 +47,8 @@ Subscribes to bundle installation, uninstall, and update events.
| Name | Type | Mandatory| Description |
| ---------------------------- | -------- | ---- | ------------------ |
| BundleChangedEvent | string | Yes | Type of the event to subscribe to.|
| Callback\<BundleChangedInfo> | callback | Yes | Callback used for the subscription.|
| type| BundleChangedEvent| Yes | Type of the event to subscribe to.|
| callback | callback\<BundleChangedInfo>| Yes | Callback used for the subscription.|
**Example**
......@@ -66,7 +66,7 @@ try {
## bundleMonitor.off
off(type: BundleChangedEvent, callback?: Callback\<BundleChangedInfo>): void;
off(type: BundleChangedEvent, callback?: callback\<BundleChangedInfo>): void;
Unsubscribes from bundle installation, uninstall, and update events.
......@@ -80,8 +80,8 @@ Unsubscribes from bundle installation, uninstall, and update events.
| Name | Type | Mandatory| Description |
| ---------------------------- | -------- | ---- | ---------------------------------------------------------- |
| BundleChangedEvent | string | Yes | Type of the event to unsubscribe from. |
| Callback\<BundleChangedInfo> | callback | Yes | Callback used for the unsubscription. If this parameter is left empty, all callbacks of the current event are unsubscribed from.|
| type| BundleChangedEvent| Yes | Type of the event to unsubscribe from. |
| callback | callback\<BundleChangedInfo>| No | Callback used for the unsubscription. If this parameter is left empty, all callbacks of the current event are unsubscribed from.|
**Example**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册