提交 be35d02d 编写于 作者: G Gloria

Update docs against 16775+17339+17236+17064+17164+16765+17330

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 148438ff
...@@ -3,14 +3,13 @@ ...@@ -3,14 +3,13 @@
The **BundleStatusCallback** module provides callbacks for bundle status changes. The changes can be 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** > **NOTE**
> >
> 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. > 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> ## BundleStatusCallback<sup>(deprecated)<sup>
> This API is deprecated since API version 9. You are advised to use [bundleMonitor](js-apis-bundleMonitor.md) instead. > This API is deprecated since API version 9. You are advised to use [bundleMonitor](js-apis-bundleMonitor.md) instead.
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**System capability**: SystemCapability.BundleManager.BundleFramework **System capability**: SystemCapability.BundleManager.BundleFramework
......
...@@ -34,7 +34,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -34,7 +34,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -62,7 +62,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -62,7 +62,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -94,7 +94,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -94,7 +94,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -121,7 +121,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -121,7 +121,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -153,7 +153,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -153,7 +153,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -179,7 +179,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -179,7 +179,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -210,7 +210,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -210,7 +210,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -236,7 +236,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -236,7 +236,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -267,7 +267,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -267,7 +267,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -293,7 +293,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -293,7 +293,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
......
...@@ -42,7 +42,7 @@ SystemCapability.BundleManager.DistributedBundleFramework ...@@ -42,7 +42,7 @@ SystemCapability.BundleManager.DistributedBundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -71,7 +71,7 @@ SystemCapability.BundleManager.DistributedBundleFramework ...@@ -71,7 +71,7 @@ SystemCapability.BundleManager.DistributedBundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -103,7 +103,7 @@ SystemCapability.BundleManager.DistributedBundleFramework ...@@ -103,7 +103,7 @@ SystemCapability.BundleManager.DistributedBundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -132,7 +132,7 @@ SystemCapability.BundleManager.DistributedBundleFramework ...@@ -132,7 +132,7 @@ SystemCapability.BundleManager.DistributedBundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
......
...@@ -426,7 +426,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -426,7 +426,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Return value** **Return value**
...@@ -462,7 +462,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -462,7 +462,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -499,7 +499,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -499,7 +499,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -540,7 +540,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -540,7 +540,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -584,7 +584,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -584,7 +584,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -626,7 +626,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -626,7 +626,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -671,7 +671,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -671,7 +671,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -699,7 +699,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -699,7 +699,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -754,7 +754,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -754,7 +754,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
...@@ -794,7 +794,7 @@ SystemCapability.BundleManager.BundleFramework ...@@ -794,7 +794,7 @@ SystemCapability.BundleManager.BundleFramework
**System API** **System API**
This is a system API and cannot be called by third-party applications. This is a system API.
**Parameters** **Parameters**
......
...@@ -24,7 +24,7 @@ Sets the disposed status for an application. This API uses a promise to return t ...@@ -24,7 +24,7 @@ Sets the disposed status for an application. This API uses a promise to return t
**System capability**: SystemCapability.BundleManager.BundleFramework.AppControl **System capability**: SystemCapability.BundleManager.BundleFramework.AppControl
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -75,7 +75,7 @@ Sets the disposed status for an application. This API uses an asynchronous callb ...@@ -75,7 +75,7 @@ Sets the disposed status for an application. This API uses an asynchronous callb
**System capability**: SystemCapability.BundleManager.BundleFramework.AppControl **System capability**: SystemCapability.BundleManager.BundleFramework.AppControl
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -122,7 +122,7 @@ Obtains the disposed status of an application. This API uses a promise to return ...@@ -122,7 +122,7 @@ Obtains the disposed status of an application. This API uses a promise to return
**System capability**: SystemCapability.BundleManager.BundleFramework.AppControl **System capability**: SystemCapability.BundleManager.BundleFramework.AppControl
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -171,7 +171,7 @@ Obtains the disposed status of an application. This API uses an asynchronous cal ...@@ -171,7 +171,7 @@ Obtains the disposed status of an application. This API uses an asynchronous cal
**System capability**: SystemCapability.BundleManager.BundleFramework.AppControl **System capability**: SystemCapability.BundleManager.BundleFramework.AppControl
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -216,7 +216,7 @@ Deletes the disposed status for an application. This API uses a promise to retur ...@@ -216,7 +216,7 @@ Deletes the disposed status for an application. This API uses a promise to retur
**System capability**: SystemCapability.BundleManager.BundleFramework.AppControl **System capability**: SystemCapability.BundleManager.BundleFramework.AppControl
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -265,7 +265,7 @@ Deletes the disposed status for an application. This API uses an asynchronous ca ...@@ -265,7 +265,7 @@ Deletes the disposed status for an application. This API uses an asynchronous ca
**System capability**: SystemCapability.BundleManager.BundleFramework.AppControl **System capability**: SystemCapability.BundleManager.BundleFramework.AppControl
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
The **BundleInstaller** module provides APIs for you to install, uninstall, and recover bundles on devices. The **BundleInstaller** module provides APIs for you to install, uninstall, and recover bundles on devices.
> **NOTE** > **NOTE**
> >
> 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. > 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.
## BundleInstaller.install<sup>(deprecated)<sup> ## BundleInstaller.install<sup>(deprecated)<sup>
...@@ -22,7 +22,7 @@ ohos.permission.INSTALL_BUNDLE ...@@ -22,7 +22,7 @@ ohos.permission.INSTALL_BUNDLE
SystemCapability.BundleManager.BundleFramework 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.
**Parameters** **Parameters**
...@@ -72,7 +72,7 @@ ohos.permission.INSTALL_BUNDLE ...@@ -72,7 +72,7 @@ ohos.permission.INSTALL_BUNDLE
SystemCapability.BundleManager.BundleFramework 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.
**Parameters** **Parameters**
...@@ -121,7 +121,7 @@ ohos.permission.INSTALL_BUNDLE ...@@ -121,7 +121,7 @@ ohos.permission.INSTALL_BUNDLE
SystemCapability.BundleManager.BundleFramework 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.
**Parameters** **Parameters**
...@@ -162,7 +162,7 @@ Describes the parameters required for bundle installation, recovery, or uninstal ...@@ -162,7 +162,7 @@ Describes the parameters required for bundle installation, recovery, or uninstal
**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.
| Name | Type | Readable| Writable| Description | | Name | Type | Readable| Writable| Description |
| ----------- | ------- | ---- | ---- | ------------------ | | ----------- | ------- | ---- | ---- | ------------------ |
...@@ -176,12 +176,12 @@ Describes the bundle installation or uninstall status. ...@@ -176,12 +176,12 @@ Describes the bundle installation or uninstall status.
**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.
| Name | Type | Readable| Writable| Description | | Name | Type | Readable| Writable| Description |
| ------------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------ | | ------------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------ |
| 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)| | 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. | | 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 ## 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 stage model, the sandbox path can be obtained using the attribute in [Context](js-apis-inner-application-uiAbilityContext.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-inner-application-uiAbilityContext.md#abilitycontext). The following describes how to obtain the sandbox path.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
The **LauncherAbilityInfo** module provides information about the launcher ability, which is obtained through [innerBundleManager.getLauncherAbilityInfos](js-apis-Bundle-InnerBundleManager.md). The **LauncherAbilityInfo** module provides information about the launcher ability, which is obtained through [innerBundleManager.getLauncherAbilityInfos](js-apis-Bundle-InnerBundleManager.md).
> **NOTE** > **NOTE**
> >
> 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. > 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.
## LauncherAbilityInfo<sup>(deprecated)<sup> ## LauncherAbilityInfo<sup>(deprecated)<sup>
...@@ -12,7 +12,7 @@ The **LauncherAbilityInfo** module provides information about the launcher abili ...@@ -12,7 +12,7 @@ The **LauncherAbilityInfo** module provides information about the launcher abili
**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.
| Name | Type | Readable| Writable| Description | | Name | Type | Readable| Writable| Description |
| --------------- | ---------------------------------------------------- | ---- | ---- | -------------------------------------- | | --------------- | ---------------------------------------------------- | ---- | ---- | -------------------------------------- |
......
...@@ -12,11 +12,11 @@ The **PermissionDef** module provides permission details defined in the configur ...@@ -12,11 +12,11 @@ The **PermissionDef** module provides permission details defined in the configur
**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.
| Name | Type | Readable| Writable| Description | | Name | Type | Readable| Writable| Description |
| -------------- | ------ | ---- | ---- | -------------- | | -------------- | ------ | ---- | ---- | -------------- |
| permissionName | string | Yes | No | Name of the permission. | | 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.| | 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 | ID of the permission label. | | labelId | number | Yes | No | ID of the permission label. |
| descriptionId | number | Yes | No | ID of the permission description. | | descriptionId | number | Yes | No | ID of the permission description. |
...@@ -12,11 +12,10 @@ The **RemoteAbilityInfo** module provides information about a remote ability. ...@@ -12,11 +12,10 @@ The **RemoteAbilityInfo** module provides information about a remote ability.
**System capability**: SystemCapability.BundleManager.DistributedBundleFramework **System capability**: SystemCapability.BundleManager.DistributedBundleFramework
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
| Name | Type | Readable| Writable| Description | | Name | Type | Readable| Writable| Description |
| ----------- | -------------------------------------------- | ---- | ---- | ----------------------- | | ----------- | -------------------------------------------- | ---- | ---- | ----------------------- |
| elementName | [ElementName](js-apis-bundle-ElementName.md) | Yes | No | Element name information of the ability. | | elementName | [ElementName](js-apis-bundle-ElementName.md) | Yes | No | Element name information of the ability. |
| label | string | Yes | No | Ability name. | | label | string | Yes | No | Ability name. |
| icon | string | Yes | No | Icon of the ability.| | icon | string | Yes | No | Icon of the ability.|
...@@ -10,7 +10,7 @@ The **LauncherAbilityInfo** module defines the ability information of the home s ...@@ -10,7 +10,7 @@ The **LauncherAbilityInfo** module defines the ability information of the home s
**System capability**: SystemCapability.BundleManager.BundleFramework.Launcher **System capability**: SystemCapability.BundleManager.BundleFramework.Launcher
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
| Name | Type | Readable| Writable| Description | | Name | Type | Readable| Writable| Description |
| --------------- | ----------------------------------------------------------- | ---- | ---- | ------------------------------------ | | --------------- | ----------------------------------------------------------- | ---- | ---- | ------------------------------------ |
......
...@@ -98,12 +98,12 @@ Enumerates the types of Extension abilities. ...@@ -98,12 +98,12 @@ Enumerates the types of Extension abilities.
| Name| Value| Description| | Name| Value| Description|
|:----------------:|:---:|-----| |:----------------:|:---:|-----|
| FORM | 0 | [FormExtensionAbility](../../application-models/widget-development-stage.md): provides APIs for widget development.| | FORM | 0 | [FormExtensionAbility](../../application-models/service-widget-overview.md): provides APIs for widget development.|
| WORK_SCHEDULER | 1 | [WorkSchedulerExtensionAbility](../../task-management/work-scheduler-dev-guide.md): enables applications to execute non-real-time tasks when the system is idle.| | WORK_SCHEDULER | 1 | [WorkSchedulerExtensionAbility](../../task-management/work-scheduler-dev-guide.md): enables applications to execute non-real-time tasks when the system is idle.|
| INPUT_METHOD | 2 | [InputMethodExtensionAbility](js-apis-inputmethod-extension-ability.md): provides APIs for developing input method applications.| | INPUT_METHOD | 2 | [InputMethodExtensionAbility](js-apis-inputmethod-extension-ability.md): provides APIs for developing input method applications.|
| SERVICE | 3 | [ServiceExtensionAbility](../../application-models/serviceextensionability.md): enables applications to run in the background and provide services.| | SERVICE | 3 | [ServiceExtensionAbility](../../application-models/serviceextensionability.md): enables applications to run in the background and provide services.|
| ACCESSIBILITY | 4 | [AccessibilityExtensionAbility](js-apis-application-accessibilityExtensionAbility.md): provides accessibility for access to and operations on the UI.| | ACCESSIBILITY | 4 | [AccessibilityExtensionAbility](js-apis-application-accessibilityExtensionAbility.md): provides accessibility for access to and operations on the UI.|
| DATA_SHARE | 5 | [DataShareExtensionAbility](../../database/database-datashare-guidelines.md): enables applications to read and write data.| | DATA_SHARE | 5 | [DataShareExtensionAbility](../../database/share-data-by-datashareextensionability.md): enables applications to read and write data.|
| FILE_SHARE | 6 | FileShareExtensionAbility: enables file sharing between applications. This ability is reserved.| | FILE_SHARE | 6 | FileShareExtensionAbility: enables file sharing between applications. This ability is reserved.|
| STATIC_SUBSCRIBER| 7 | [StaticSubscriberExtensionAbility](js-apis-application-staticSubscriberExtensionAbility.md): provides APIs for processing static events, such as the startup event.| | STATIC_SUBSCRIBER| 7 | [StaticSubscriberExtensionAbility](js-apis-application-staticSubscriberExtensionAbility.md): provides APIs for processing static events, such as the startup event.|
| WALLPAPER | 8 | WallpaperExtensionAbility: provides APIs to implement the home screen wallpaper. This ability is reserved.| | WALLPAPER | 8 | WallpaperExtensionAbility: provides APIs to implement the home screen wallpaper. This ability is reserved.|
...@@ -113,6 +113,7 @@ Enumerates the types of Extension abilities. ...@@ -113,6 +113,7 @@ Enumerates the types of Extension abilities.
| THUMBNAIL | 13 | ThumbnailExtensionAbility: provides thumbnails for files. This ability is reserved.| | THUMBNAIL | 13 | ThumbnailExtensionAbility: provides thumbnails for files. This ability is reserved.|
| PREVIEW | 14 | PreviewExtensionAbility: provides APIs for file preview so that other applications can be embedded and displayed in the current application. This ability is reserved.| | PREVIEW | 14 | PreviewExtensionAbility: provides APIs for file preview so that other applications can be embedded and displayed in the current application. This ability is reserved.|
| PRINT<sup>10+</sup> | 15 | PrintExtensionAbility: provides APIs for printing images. Printing documents is not supported yet.| | PRINT<sup>10+</sup> | 15 | PrintExtensionAbility: provides APIs for printing images. Printing documents is not supported yet.|
| DRIVER<sup>10+</sup> | 18 | DriverExtensionAbility: provides APIs for the peripheral driver. This type of ability is not supported yet.|
| UNSPECIFIED | 255 | No type is specified. It is used together with **queryExtensionAbilityInfo** to query all types of Extension abilities.| | UNSPECIFIED | 255 | No type is specified. It is used together with **queryExtensionAbilityInfo** to query all types of Extension abilities.|
...@@ -187,7 +188,7 @@ Enumerates the display orientations of the ability. This attribute applies only ...@@ -187,7 +188,7 @@ Enumerates the display orientations of the ability. This attribute applies only
| AUTO_ROTATION_PORTRAIT_RESTRICTED |11|Switched-determined auto rotation in the vertical direction.| | AUTO_ROTATION_PORTRAIT_RESTRICTED |11|Switched-determined auto rotation in the vertical direction.|
| LOCKED |12|Locked.| | LOCKED |12|Locked.|
### CompatiblePolicy ### CompatiblePolicy<sup>10+</sup>
Defines the version compatibility type of the shared library. Defines the version compatibility type of the shared library.
...@@ -3069,3 +3070,167 @@ try { ...@@ -3069,3 +3070,167 @@ try {
hilog.error(0x0000, 'testTag', 'getAllSharedBundleInfo failed. Cause: %{public}s', err.message); hilog.error(0x0000, 'testTag', 'getAllSharedBundleInfo failed. Cause: %{public}s', err.message);
} }
``` ```
### bundleManager.getAppProvisionInfo<sup>10+</sup>
getAppProvisionInfo(bundleName: string, callback: AsyncCallback\<[AppProvisionInfo](js-apis-bundleManager-AppProvisionInfo.md)\>): void;
Obtains the provision configuration file information based on the given bundle name. This API uses an asynchronous callback to return the result.
**System API**: This is a system API.
**Required permissions**: ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| bundleName | string | Yes | Bundle name.|
| callback | AsyncCallback\<[AppProvisionInfo](js-apis-bundleManager-AppProvisionInfo.md)\> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null** and **data** is the provision configuration file information obtained.|
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
| ID| Error Message |
| -------- | -------------------------------------- |
| 17700001 | The specified bundleName is not found. |
**Example**
```ts
import bundleManager from '@ohos.bundle.bundleManager';
import hilog from '@ohos.hilog';
let bundleName = "com.ohos.myapplication";
try {
bundleManager.getAppProvisionInfo(bundleName, (err, data) => {
if (err) {
hilog.error(0x0000, 'testTag', 'getAppProvisionInfo failed: %{public}s', err.message);
} else {
hilog.info(0x0000, 'testTag', 'getAppProvisionInfo successfully: %{public}s', JSON.stringify(data));
}
});
} catch (err) {
hilog.error(0x0000, 'testTag', 'getAppProvisionInfo failed: %{public}s', err.message);
}
```
### bundleManager.getAppProvisionInfo<sup>10+</sup>
getAppProvisionInfo(bundleName: string, userId: number, callback: AsyncCallback\<[AppProvisionInfo](js-apis-bundleManager-AppProvisionInfo.md)\>): void;
Obtains the provision configuration file information based on the given bundle name and user ID. This API uses an asynchronous callback to return the result.
**System API**: This is a system API.
**Required permissions**: ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| bundleName | string | Yes | Bundle name.|
| userId | number | Yes| User ID, which can be obtained by calling [getOsAccountLocalId](js-apis-osAccount.md#getosaccountlocalid9).|
| callback | AsyncCallback\<[AppProvisionInfo](js-apis-bundleManager-AppProvisionInfo.md)\> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null** and **data** is the provision configuration file information obtained.|
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
| ID| Error Message |
| -------- | -------------------------------------- |
| 17700001 | The specified bundleName is not found. |
| 17700004 | The specified user ID is not found. |
**Example**
```ts
import bundleManager from '@ohos.bundle.bundleManager';
import hilog from '@ohos.hilog';
let bundleName = "com.ohos.myapplication";
let userId = 100;
try {
bundleManager.getAppProvisionInfo(bundleName, userId, (err, data) => {
if (err) {
hilog.error(0x0000, 'testTag', 'getAppProvisionInfo failed: %{public}s', err.message);
} else {
hilog.info(0x0000, 'testTag', 'getAppProvisionInfo successfully: %{public}s', JSON.stringify(data));
}
});
} catch (err) {
hilog.error(0x0000, 'testTag', 'getAppProvisionInfo failed: %{public}s', err.message);
}
```
### bundleManager.getAppProvisionInfo<sup>10+</sup>
getAppProvisionInfo(bundleName: string, userId?: number): Promise\<[AppProvisionInfo](js-apis-bundleManager-AppProvisionInfo.md)\>;
Obtains the provision configuration file information based on the given bundle name and user ID. This API uses a promise to return the result.
**System API**: This is a system API.
**Required permissions**: ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| bundleName | string | Yes| Bundle name.|
| userId | number | No| User ID, which can be obtained by calling [getOsAccountLocalId](js-apis-osAccount.md#getosaccountlocalid9).|
**Return value**
| Type | Description |
| ------------------------------------------------------------ | ----------------------------------- |
| Promise\<[AppProvisionInfo](js-apis-bundleManager-AppProvisionInfo.md)\> | Promise used to return the provision configuration file obtained.|
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
| ID| Error Message |
| -------- | -------------------------------------- |
| 17700001 | The specified bundleName is not found. |
| 17700004 | The specified user ID is not found. |
**Example**
```ts
import bundleManager from '@ohos.bundle.bundleManager';
import hilog from '@ohos.hilog';
let bundleName = "com.ohos.myapplication";
let userId = 100;
try {
bundleManager.getAppProvisionInfo(bundleName).then((data) => {
hilog.info(0x0000, 'testTag', 'getAppProvisionInfo successfully. Data: %{public}s', JSON.stringify(data));
}).catch(err => {
hilog.error(0x0000, 'testTag', 'getAppProvisionInfo failed. Cause: %{public}s', err.message);
});
} catch (err) {
hilog.error(0x0000, 'testTag', 'getAppProvisionInfo failed. Cause: %{public}s', err.message);
}
try {
bundleManager.getAppProvisionInfo(bundleName, userId).then((data) => {
hilog.info(0x0000, 'testTag', 'getAppProvisionInfo successfully. Data: %{public}s', JSON.stringify(data));
}).catch(err => {
hilog.error(0x0000, 'testTag', 'getAppProvisionInfo failed. Cause: %{public}s', err.message);
});
} catch (err) {
hilog.error(0x0000, 'testTag', 'getAppProvisionInfo failed. Cause: %{public}s', err.message);
}
```
<!--no_check-->
\ No newline at end of file
...@@ -24,7 +24,7 @@ For details, see [Permission Levels](../../security/accesstoken-overview.md). ...@@ -24,7 +24,7 @@ For details, see [Permission Levels](../../security/accesstoken-overview.md).
**System capability**: SystemCapability.BundleManager.BundleFramework.Core **System capability**: SystemCapability.BundleManager.BundleFramework.Core
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
| Name | Template | Readable| Writable| Description | | Name | Template | Readable| Writable| Description |
| ---------- | ------ | ---- | ---- | -------------------------- | | ---------- | ------ | ---- | ---- | -------------------------- |
...@@ -39,7 +39,7 @@ Subscribes to bundle installation, uninstall, and update events. ...@@ -39,7 +39,7 @@ Subscribes to bundle installation, uninstall, and update events.
**Required permissions**: ohos.permission.LISTEN_BUNDLE_CHANGE **Required permissions**: ohos.permission.LISTEN_BUNDLE_CHANGE
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core **System capability**: SystemCapability.BundleManager.BundleFramework.Core
...@@ -72,7 +72,7 @@ Unsubscribes from bundle installation, uninstall, and update events. ...@@ -72,7 +72,7 @@ Unsubscribes from bundle installation, uninstall, and update events.
**Required permissions**: ohos.permission.LISTEN_BUNDLE_CHANGE **Required permissions**: ohos.permission.LISTEN_BUNDLE_CHANGE
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core **System capability**: SystemCapability.BundleManager.BundleFramework.Core
......
...@@ -109,7 +109,7 @@ Obtains the default application based on a system-defined application type or a ...@@ -109,7 +109,7 @@ Obtains the default application based on a system-defined application type or a
**System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp **System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -165,7 +165,7 @@ Obtains the default application of a user based on a system-defined application ...@@ -165,7 +165,7 @@ Obtains the default application of a user based on a system-defined application
**System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp **System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -217,7 +217,7 @@ Obtains the default application based on a system-defined application type or a ...@@ -217,7 +217,7 @@ Obtains the default application based on a system-defined application type or a
**System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp **System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -266,7 +266,7 @@ Sets the default application based on a system-defined application type or a fil ...@@ -266,7 +266,7 @@ Sets the default application based on a system-defined application type or a fil
**System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp **System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -338,7 +338,7 @@ Sets the default application for a user based on a system-defined application ty ...@@ -338,7 +338,7 @@ Sets the default application for a user based on a system-defined application ty
**System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp **System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -399,7 +399,7 @@ Sets the default application based on a system-defined application type or a fil ...@@ -399,7 +399,7 @@ Sets the default application based on a system-defined application type or a fil
**System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp **System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -458,7 +458,7 @@ Resets the default application based on a system-defined application type or a f ...@@ -458,7 +458,7 @@ Resets the default application based on a system-defined application type or a f
**System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp **System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -508,7 +508,7 @@ Resets the default application for a user based on a system-defined application ...@@ -508,7 +508,7 @@ Resets the default application for a user based on a system-defined application
**System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp **System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -559,7 +559,7 @@ Resets the default application based on a system-defined application type or a f ...@@ -559,7 +559,7 @@ Resets the default application based on a system-defined application type or a f
**System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp **System capability**: SystemCapability.BundleManager.BundleFramework.DefaultApp
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
......
...@@ -29,7 +29,7 @@ Obtains the launcher ability information based on the given bundle name and user ...@@ -29,7 +29,7 @@ Obtains the launcher ability information based on the given bundle name and user
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---------- | ------ | ---- | -------------- | | ---------- | ------ | ---- | -------------- |
| bundleName | string | Yes | Bundle name of the application.| | bundleName | string | Yes | Bundle name.|
| userId | number | Yes | User ID.| | userId | number | Yes | User ID.|
**Return value** **Return value**
...@@ -45,7 +45,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -45,7 +45,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message | | ID| Error Message |
| -------- | ---------------------------------------- | | -------- | ---------------------------------------- |
| 17700001 | The specified bundle name is not found. | | 17700001 | The specified bundle name is not found. |
| 17700004 | The specified userId is not found. | | 17700004 | The specified user ID is not found. |
**Example** **Example**
...@@ -55,12 +55,13 @@ import launcherBundleManager from '@ohos.bundle.launcherBundleManager'; ...@@ -55,12 +55,13 @@ import launcherBundleManager from '@ohos.bundle.launcherBundleManager';
try { try {
launcherBundleManager.getLauncherAbilityInfo('com.example.demo', 100, (errData, data) => { launcherBundleManager.getLauncherAbilityInfo('com.example.demo', 100, (errData, data) => {
if (errData !== null) { if (errData !== null) {
console.log(`errData is errCode:${errData.code} message:${errData.message}`); console.error(`errData is errCode:${errData.code} message:${errData.message}`);
} else {
console.log("data is " + JSON.stringify(data));
} }
console.log("data is " + JSON.stringify(data));
}) })
} catch (errData) { } catch (errData) {
console.log(`errData is errCode:${errData.code} message:${errData.message}`); console.error(`errData is errCode:${errData.code} message:${errData.message}`);
} }
``` ```
...@@ -80,7 +81,7 @@ Obtains the launcher ability information based on the given bundle name and user ...@@ -80,7 +81,7 @@ Obtains the launcher ability information based on the given bundle name and user
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---------- | ------ | ---- | -------------- | | ---------- | ------ | ---- | -------------- |
| bundleName | string | Yes | Bundle name of the application.| | bundleName | string | Yes | Bundle name.|
| userId | number | Yes | User ID.| | userId | number | Yes | User ID.|
**Return value** **Return value**
...@@ -96,7 +97,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -96,7 +97,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message | | ID| Error Message |
| -------- | ---------------------------------------- | | -------- | ---------------------------------------- |
| 17700001 | The specified bundle name is not found. | | 17700001 | The specified bundle name is not found. |
| 17700004 | The specified userId is not found. | | 17700004 | The specified user ID is not found. |
**Example** **Example**
...@@ -107,10 +108,10 @@ try { ...@@ -107,10 +108,10 @@ try {
launcherBundleManager.getLauncherAbilityInfo("com.example.demo", 100).then(data => { launcherBundleManager.getLauncherAbilityInfo("com.example.demo", 100).then(data => {
console.log("data is " + JSON.stringify(data)); console.log("data is " + JSON.stringify(data));
}).catch (errData => { }).catch (errData => {
console.log(`errData is errCode:${errData.code} message:${errData.message}`); console.error(`errData is errCode:${errData.code} message:${errData.message}`);
}) })
} catch (errData) { } catch (errData) {
console.log(`errData is errCode:${errData.code} message:${errData.message}`); console.error(`errData is errCode:${errData.code} message:${errData.message}`);
} }
``` ```
...@@ -144,7 +145,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -144,7 +145,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message | | ID| Error Message |
| -------- | ---------------------------------------- | | -------- | ---------------------------------------- |
| 17700004 | The specified userId is not found. | | 17700004 | The specified user ID is not found. |
Example Example
...@@ -154,12 +155,13 @@ import launcherBundleManager from '@ohos.bundle.launcherBundleManager'; ...@@ -154,12 +155,13 @@ import launcherBundleManager from '@ohos.bundle.launcherBundleManager';
try { try {
launcherBundleManager.getAllLauncherAbilityInfo(100, (errData, data) => { launcherBundleManager.getAllLauncherAbilityInfo(100, (errData, data) => {
if (errData !== null) { if (errData !== null) {
console.log(`errData is errCode:${errData.code} message:${errData.message}`); console.error(`errData is errCode:${errData.code} message:${errData.message}`);
} else {
console.log("data is " + JSON.stringify(data));
} }
console.log("data is " + JSON.stringify(data));
}); });
} catch (errData) { } catch (errData) {
console.log(`errData is errCode:${errData.code} message:${errData.message}`); console.error(`errData is errCode:${errData.code} message:${errData.message}`);
} }
``` ```
## launcherBundlemanager.getAllLauncherAbilityInfo<sup>9+</sup> ## launcherBundlemanager.getAllLauncherAbilityInfo<sup>9+</sup>
...@@ -192,7 +194,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -192,7 +194,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message | | ID| Error Message |
| -------- | ---------------------------------------- | | -------- | ---------------------------------------- |
| 17700004 | The specified userId is not found. | | 17700004 | The specified user ID is not found. |
**Example** **Example**
...@@ -203,10 +205,10 @@ try { ...@@ -203,10 +205,10 @@ try {
launcherBundleManager.getAllLauncherAbilityInfo(100).then(data => { launcherBundleManager.getAllLauncherAbilityInfo(100).then(data => {
console.log("data is " + JSON.stringify(data)); console.log("data is " + JSON.stringify(data));
}).catch (errData => { }).catch (errData => {
console.log(`errData is errCode:${errData.code} message:${errData.message}`); console.error(`errData is errCode:${errData.code} message:${errData.message}`);
}); });
} catch (errData) { } catch (errData) {
console.log(`errData is errCode:${errData.code} message:${errData.message}`); console.error(`errData is errCode:${errData.code} message:${errData.message}`);
} }
``` ```
...@@ -224,7 +226,7 @@ Obtains the shortcut information of the current user based on the given bundle n ...@@ -224,7 +226,7 @@ Obtains the shortcut information of the current user based on the given bundle n
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---------- | ------ | ---- | -------------- | | ---------- | ------ | ---- | -------------- |
| bundleName | string | Yes | Bundle name of the application.| | bundleName | string | Yes | Bundle name.|
**Return value** **Return value**
...@@ -248,12 +250,13 @@ import launcherBundleManager from '@ohos.bundle.launcherBundleManager'; ...@@ -248,12 +250,13 @@ import launcherBundleManager from '@ohos.bundle.launcherBundleManager';
try { try {
launcherBundleManager.getShortcutInfo("com.example.demo", (errData, data) => { launcherBundleManager.getShortcutInfo("com.example.demo", (errData, data) => {
if (errData !== null) { if (errData !== null) {
console.log(`errData is errCode:${errData.code} message:${errData.message}`); console.error(`errData is errCode:${errData.code} message:${errData.message}`);
} else {
console.log("data is " + JSON.stringify(data));
} }
console.log("data is " + JSON.stringify(data));
}); });
} catch (errData) { } catch (errData) {
console.log(`errData is errCode:${errData.code} message:${errData.message}`); console.error(`errData is errCode:${errData.code} message:${errData.message}`);
} }
``` ```
...@@ -271,7 +274,7 @@ Obtains the shortcut information of the current user based on the given bundle n ...@@ -271,7 +274,7 @@ Obtains the shortcut information of the current user based on the given bundle n
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---------- | ------ | ---- | -------------- | | ---------- | ------ | ---- | -------------- |
| bundleName | string | Yes | Bundle name of the application.| | bundleName | string | Yes | Bundle name.|
**Return value** **Return value**
...@@ -296,9 +299,9 @@ try { ...@@ -296,9 +299,9 @@ try {
launcherBundleManager.getShortcutInfo("com.example.demo").then(data => { launcherBundleManager.getShortcutInfo("com.example.demo").then(data => {
console.log("data is " + JSON.stringify(data)); console.log("data is " + JSON.stringify(data));
}).catch (errData => { }).catch (errData => {
console.log(`errData is errCode:${errData.code} message:${errData.message}`); console.error(`errData is errCode:${errData.code} message:${errData.message}`);
}); });
} catch (errData) { } catch (errData) {
console.log(`errData is errCode:${errData.code} message:${errData.message}`); console.error(`errData is errCode:${errData.code} message:${errData.message}`);
} }
``` ```
...@@ -239,7 +239,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -239,7 +239,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message | | ID| Error Message |
| ------ | -------------------------------------- | | ------ | -------------------------------------- |
| 17700002 | The specified module name is not found. | | 17700002 | The specified module name is not found. |
| 17700032 | he specified bundle does not contain any overlay module. | | 17700032 | The specified bundle does not contain any overlay module. |
| 17700033 | The specified module is not an overlay module. | | 17700033 | The specified module is not an overlay module. |
**Example** **Example**
...@@ -415,7 +415,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -415,7 +415,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message | | ID| Error Message |
| ------ | -------------------------------------- | | ------ | -------------------------------------- |
| 17700001 | The specified bundleName is not found | | 17700001 | The specified bundleName is not found. |
| 17700002 | The specified module name is not found. | | 17700002 | The specified module name is not found. |
| 17700032 | The specified bundle does not contain any overlay module. | | 17700032 | The specified bundle does not contain any overlay module. |
| 17700033 | The specified module is not an overlay module. | | 17700033 | The specified module is not an overlay module. |
...@@ -462,7 +462,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -462,7 +462,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message | | ID| Error Message |
| ------ | -------------------------------------- | | ------ | -------------------------------------- |
| 17700001 | The specified bundleName is not found | | 17700001 | The specified bundleName is not found. |
| 17700002 | The specified module name is not found. | | 17700002 | The specified module name is not found. |
| 17700032 | The specified bundle does not contain any overlay module. | | 17700032 | The specified bundle does not contain any overlay module. |
| 17700033 | The specified module is not an overlay module. | | 17700033 | The specified module is not an overlay module. |
...@@ -511,7 +511,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -511,7 +511,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message | | ID| Error Message |
| ------ | -------------------------------------- | | ------ | -------------------------------------- |
| 17700001 | The specified bundleName is not found | | 17700001 | The specified bundleName is not found. |
| 17700002 | The specified module name is not found. | | 17700002 | The specified module name is not found. |
| 17700032 | The specified bundle does not contain any overlay module. | | 17700032 | The specified bundle does not contain any overlay module. |
| 17700033 | The specified module is not an overlay module. | | 17700033 | The specified module is not an overlay module. |
...@@ -557,7 +557,7 @@ Obtains the information about modules with the overlay feature in another applic ...@@ -557,7 +557,7 @@ Obtains the information about modules with the overlay feature in another applic
| Type | Description | | Type | Description |
| ------------------------- | ------------------ | | ------------------------- | ------------------ |
| Promise\<Array\<OverlayModuleInfo>> | Promise used to return the array of overlay module information obtained.| | Promise\<Array\<OverlayModuleInfo>> | Promise used to return the result, which is an array of **OverlayModuleInfo** objects.|
**Error codes** **Error codes**
...@@ -565,7 +565,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -565,7 +565,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message | | ID| Error Message |
| ------ | -------------------------------------- | | ------ | -------------------------------------- |
| 17700001 | The specified bundleName is not found | | 17700001 | The specified bundleName is not found. |
| 17700002 | The specified module name is not found. | | 17700002 | The specified module name is not found. |
| 17700034 | The specified module is an overlay module. | | 17700034 | The specified module is an overlay module. |
| 17700035 | The specified bundle is an overlay bundle. | | 17700035 | The specified bundle is an overlay bundle. |
...@@ -612,7 +612,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -612,7 +612,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message | | ID| Error Message |
| ------ | -------------------------------------- | | ------ | -------------------------------------- |
| 17700001 | The specified bundleName is not found | | 17700001 | The specified bundleName is not found. |
| 17700002 | The specified module name is not found. | | 17700002 | The specified module name is not found. |
| 17700034 | The specified module is an overlay module. | | 17700034 | The specified module is an overlay module. |
| 17700035 | The specified bundle is an overlay bundle. | | 17700035 | The specified bundle is an overlay bundle. |
...@@ -661,7 +661,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -661,7 +661,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message | | ID| Error Message |
| ------ | -------------------------------------- | | ------ | -------------------------------------- |
| 17700001 | The specified bundleName is not found | | 17700001 | The specified bundleName is not found. |
| 17700002 | The specified module name is not found. | | 17700002 | The specified module name is not found. |
| 17700034 | The specified module is an overlay module. | | 17700034 | The specified module is an overlay module. |
| 17700035 | The specified bundle is an overlay bundle. | | 17700035 | The specified bundle is an overlay bundle. |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册