提交 8e25e91b 编写于 作者: X xsz233

Merge remote-tracking branch 'upstream/master'

...@@ -397,7 +397,7 @@ zh-cn/application-dev/reference/apis/js-apis-notification.md @jayleehw @RayShih ...@@ -397,7 +397,7 @@ zh-cn/application-dev/reference/apis/js-apis-notification.md @jayleehw @RayShih
zh-cn/application-dev/reference/apis/js-apis-observer.md @zhang-hai-feng @zengyawen @jyh926 @gaoxi785 zh-cn/application-dev/reference/apis/js-apis-observer.md @zhang-hai-feng @zengyawen @jyh926 @gaoxi785
zh-cn/application-dev/reference/apis/js-apis-osAccount.md @nianCode @zengyawen @JiDong-CS @murphy1984 zh-cn/application-dev/reference/apis/js-apis-osAccount.md @nianCode @zengyawen @JiDong-CS @murphy1984
zh-cn/application-dev/reference/apis/js-apis-particleAbility.md @littlejerry1 @RayShih @gwang2008 @chengxingzhen zh-cn/application-dev/reference/apis/js-apis-particleAbility.md @littlejerry1 @RayShih @gwang2008 @chengxingzhen
zh-cn/application-dev/reference/apis/js-apis-pasteboard.md @feng-aiwen @ge-yafang @gong-a-shi @logic42 zh-cn/application-dev/reference/apis/js-apis-pasteboard.md @han-zhengshi @ge-yafang @logic42
zh-cn/application-dev/reference/apis/js-apis-permissionrequestresult.md @littlejerry1 @RayShih @gwang2008 @chengxingzhen zh-cn/application-dev/reference/apis/js-apis-permissionrequestresult.md @littlejerry1 @RayShih @gwang2008 @chengxingzhen
zh-cn/application-dev/reference/apis/js-apis-plainarray.md @gongjunsong @ge-yafang @flyingwolf @BlackStone zh-cn/application-dev/reference/apis/js-apis-plainarray.md @gongjunsong @ge-yafang @flyingwolf @BlackStone
zh-cn/application-dev/reference/apis/js-apis-pointer.md @yuanxinying @ningningW @cococoler @alien0208 zh-cn/application-dev/reference/apis/js-apis-pointer.md @yuanxinying @ningningW @cococoler @alien0208
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
- master:最新开发版本。 - master:最新开发版本。
- OpenHarmony 3.2 Beta5版本:点击[此处](zh-cn/release-notes/OpenHarmony-v3.2-beta5.md)了解版本详情。 - OpenHarmony 3.2 Release版本:点击[此处](zh-cn/release-notes/OpenHarmony-v3.2-release.md)了解版本详情。
- OpenHarmony 3.1 Release版本:点击[此处](zh-cn/release-notes/OpenHarmony-v3.1-release.md)了解版本详情。 - OpenHarmony 3.1 Release版本:点击[此处](zh-cn/release-notes/OpenHarmony-v3.1-release.md)了解版本详情。
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
- ExtensionAbility Component - ExtensionAbility Component
- [ExtensionAbility Component Overview](extensionability-overview.md) - [ExtensionAbility Component Overview](extensionability-overview.md)
- [ServiceExtensionAbility](serviceextensionability.md) - [ServiceExtensionAbility](serviceextensionability.md)
- [DataShareExtensionAbility (for System Applications Only)](datashareextensionability.md)
- [FormExtensionAbility (Widget)](widget-development-stage.md) - [FormExtensionAbility (Widget)](widget-development-stage.md)
- [AccessibilityExtensionAbility](accessibilityextensionability.md) - [AccessibilityExtensionAbility](accessibilityextensionability.md)
- [EnterpriseAdminExtensionAbility](enterprise-extensionAbility.md) - [EnterpriseAdminExtensionAbility](enterprise-extensionAbility.md)
...@@ -46,7 +45,7 @@ ...@@ -46,7 +45,7 @@
- [Common Event Subscription Overview](common-event-subscription-overview.md) - [Common Event Subscription Overview](common-event-subscription-overview.md)
- [Subscribing to Common Events in Dynamic Mode](common-event-subscription.md) - [Subscribing to Common Events in Dynamic Mode](common-event-subscription.md)
- [Subscribing to Common Events in Static Mode (for System Applications Only)](common-event-static-subscription.md) - [Subscribing to Common Events in Static Mode (for System Applications Only)](common-event-static-subscription.md)
- [Unsubscribing from Common Events](common-event-unsubscription.md) - [Unsubscribing from Common Events](common-event-unsubscription.md)
- [Publishing Common Events](common-event-publish.md) - [Publishing Common Events](common-event-publish.md)
- [Background Services](background-services.md) - [Background Services](background-services.md)
- Inter-Thread Communication - Inter-Thread Communication
......
...@@ -25,6 +25,12 @@ An [ExtensionAbilityType](../reference/apis/js-apis-bundleManager.md#extensionab ...@@ -25,6 +25,12 @@ An [ExtensionAbilityType](../reference/apis/js-apis-bundleManager.md#extensionab
- [EnterpriseAdminExtensionAbility](../reference/apis/js-apis-EnterpriseAdminExtensionAbility.md): ExtensionAbility component of the enterprise_admin type, which provides APIs for processing enterprise management events, such as application installation events on devices and events indicating too many incorrect screen-lock password attempts. - [EnterpriseAdminExtensionAbility](../reference/apis/js-apis-EnterpriseAdminExtensionAbility.md): ExtensionAbility component of the enterprise_admin type, which provides APIs for processing enterprise management events, such as application installation events on devices and events indicating too many incorrect screen-lock password attempts.
> **NOTE**<br>
> 1. Third-party applications cannot implement ServiceExtensionAbility, DataShareExtensionAbility, StaticSubscriberExtensionAbility, or WindowExtensionAbility.
>
> 2. To implement transaction processing in the background for a third-party application, use background tasks rather than ServiceExtensionAbility. For details, see [Background Task](../task-management/background-task-overview.md).
>
> 3. Third-party applications can use other types of ExtensionAbility components that have been defined.
## Using ExtensionAbility of the Specified Type ## Using ExtensionAbility of the Specified Type
......
...@@ -10,7 +10,7 @@ The following figure shows the basic concepts used in the stage model. ...@@ -10,7 +10,7 @@ The following figure shows the basic concepts used in the stage model.
- [UIAbility component](uiability-overview.md) and [ExtensionAbility component](extensionability-overview.md) - [UIAbility component](uiability-overview.md) and [ExtensionAbility component](extensionability-overview.md)
The stage model provides two types of application components: UIAbility and ExtensionAbility. Both have specific classes and support object-oriented development. They are the specific implementation of the abstract ability concept on the stage model. They are also units scheduled by the Ability Manager Service (AMS), which schedules their lifecycles as well. The stage model provides two types of application components: UIAbility and ExtensionAbility. Both have specific classes and support object-oriented development.
- UIAbility has the UI and is mainly used for user interaction. For example, with UIAbility, the Gallery application can display images in the liquid layout. After a user selects an image, it uses a new UI to display the image details. The user can touch the **Back** button to return to the liquid layout. The lifecycle of the UIAbility component contains the creation, destruction, foreground, and background states. Display-related states are exposed through WindowStage events. - UIAbility has the UI and is mainly used for user interaction. For example, with UIAbility, the Gallery application can display images in the liquid layout. After a user selects an image, it uses a new UI to display the image details. The user can touch the **Back** button to return to the liquid layout. The lifecycle of the UIAbility component contains the creation, destruction, foreground, and background states. Display-related states are exposed through WindowStage events.
...@@ -22,6 +22,7 @@ The following figure shows the basic concepts used in the stage model. ...@@ -22,6 +22,7 @@ The following figure shows the basic concepts used in the stage model.
- [Context](application-context-stage.md) - [Context](application-context-stage.md)
In the stage model, Context and its derived classes provide a variety of resources and capabilities that can be called during the runtime. The UIAbility component and ExtensionAbility derived classes have different Context classes. These classes, which all inherit from the base class Context, provide different capabilities. In the stage model, Context and its derived classes provide a variety of resources and capabilities that can be called during the runtime. The UIAbility component and ExtensionAbility derived classes have different Context classes. These classes, which all inherit from the base class Context, provide different capabilities.
- [AbilityStage](abilitystage.md) - [AbilityStage](abilitystage.md)
Each HAP of the Entry or Feature type has an AbilityStage class instance during the runtime. When the code in the HAP is loaded to the process for the first time, the system creates an AbilityStage class instance first. Each UIAbility class defined in the HAP is associated with this class instance after instantiation. Through this class instance, you can obtain the runtime information of the UIAbility instances in the HAP. Each HAP of the Entry or Feature type has an AbilityStage class instance during the runtime. When the code in the HAP is loaded to the process for the first time, the system creates an AbilityStage class instance first. Each UIAbility class defined in the HAP is associated with this class instance after instantiation. Through this class instance, you can obtain the runtime information of the UIAbility instances in the HAP.
......
...@@ -5,10 +5,25 @@ ...@@ -5,10 +5,25 @@
UIAbility is a type of application component that provides the UI for user interaction. UIAbility is a type of application component that provides the UI for user interaction.
UIAbility is the basic unit scheduled by the system and provides a window for applications to draw UIs. An application can contain one or more UIAbility components. For example, for a payment application, you can use two UIAbility components to carry the entry and payment functionalities. You are advised to use one UIAbility component to carry the same functional module, with multiple pages (if necessary). The following design philosophy is behind UIAbility:
1. Native support for [cross-device migration](hop-cross-device-migration.md) and [multi-device collaboration](hop-multi-device-collaboration.md) at the application component level
2. Support for multiple device types and window forms
For details, see [Interpretation of the Application Model](application-model-description.md).
The UIAbility division principles and suggestions are as follows:
UIAbility is the basic unit scheduled by the system and provides a window for applications to draw UIs. An application can contain one or more UIAbility components. For example, for a payment application, you can use two UIAbility components to carry the entry and payment functionalities.
Each UIAbility component instance is displayed as a mission in Recents. Each UIAbility component instance is displayed as a mission in Recents.
You can develop a single UIAbility or multiple UIAbilities for your application based on service requirements.
- If you want only one mission to be displayed in Recents, use one UIAbility and multiple pages.
- If you want multiple missions to be displayed in Recents or multiple windows to be opened simultaneously, use multiple UIAbilities.
## Privacy Statement Configuration ## Privacy Statement Configuration
......
...@@ -173,6 +173,7 @@ ...@@ -173,6 +173,7 @@
- [@ohos.promptAction (Prompt)](js-apis-promptAction.md) - [@ohos.promptAction (Prompt)](js-apis-promptAction.md)
- [@ohos.router (Page Routing)](js-apis-router.md) - [@ohos.router (Page Routing)](js-apis-router.md)
- [@ohos.measure (Text Measurement)](js-apis-measure.md) - [@ohos.measure (Text Measurement)](js-apis-measure.md)
- [@ohos.uiAppearance (UI Appearance)](js-apis-uiappearance.md)
- Graphics - Graphics
- [@ohos.animation.windowAnimationManager (Window Animation Management)](js-apis-windowAnimationManager.md) - [@ohos.animation.windowAnimationManager (Window Animation Management)](js-apis-windowAnimationManager.md)
...@@ -227,7 +228,7 @@ ...@@ -227,7 +228,7 @@
- [@ohos.data.dataShareResultSet (DataShare Result Set)](js-apis-data-DataShareResultSet.md) - [@ohos.data.dataShareResultSet (DataShare Result Set)](js-apis-data-DataShareResultSet.md)
- [@ohos.data.distributedDataObject (Distributed Data Object)](js-apis-data-distributedobject.md) - [@ohos.data.distributedDataObject (Distributed Data Object)](js-apis-data-distributedobject.md)
- [@ohos.data.distributedKVStore (Distributed KV Store)](js-apis-distributedKVStore.md) - [@ohos.data.distributedKVStore (Distributed KV Store)](js-apis-distributedKVStore.md)
- [@ohos.data.preferences (Preferences)](js-apis-data-preferences.md) - [@ohos.data.preferences (User Preferences)](js-apis-data-preferences.md)
- [@ohos.data.relationalStore (RDB Store)](js-apis-data-relationalStore.md) - [@ohos.data.relationalStore (RDB Store)](js-apis-data-relationalStore.md)
- [@ohos.data.ValuesBucket (Value Bucket)](js-apis-data-valuesBucket.md) - [@ohos.data.ValuesBucket (Value Bucket)](js-apis-data-valuesBucket.md)
...@@ -266,6 +267,7 @@ ...@@ -266,6 +267,7 @@
- [@ohos.request (Upload and Download)](js-apis-request.md) - [@ohos.request (Upload and Download)](js-apis-request.md)
- Connectivity - Connectivity
- [@ohos.bluetooth (Bluetooth)(To Be Deprecated Soon)](js-apis-bluetooth.md)
- [@ohos.bluetoothManager (Bluetooth)(js-apis-bluetoothManager.md) - [@ohos.bluetoothManager (Bluetooth)(js-apis-bluetoothManager.md)
- [@ohos.connectedTag (Active Tags)](js-apis-connectedTag.md) - [@ohos.connectedTag (Active Tags)](js-apis-connectedTag.md)
- [@ohos.nfc.cardEmulation (Standard NFC Card Emulation)](js-apis-cardEmulation.md) - [@ohos.nfc.cardEmulation (Standard NFC Card Emulation)](js-apis-cardEmulation.md)
...@@ -274,8 +276,8 @@ ...@@ -274,8 +276,8 @@
- [@ohos.rpc (RPC)](js-apis-rpc.md) - [@ohos.rpc (RPC)](js-apis-rpc.md)
- [@ohos.wifiManager (WLAN)](js-apis-wifiManager.md) - [@ohos.wifiManager (WLAN)](js-apis-wifiManager.md)
- [@ohos.wifiManagerExt (WLAN Extension)](js-apis-wifiManagerExt.md) - [@ohos.wifiManagerExt (WLAN Extension)](js-apis-wifiManagerExt.md)
- [@ohos.wifi (To Be Deprecated Soon)](js-apis-wifi.md) - [@ohos.wifi (WLAN)(To Be Deprecated Soon)](js-apis-wifi.md)
- [@ohos.wifiext (To Be Deprecated Soon)](js-apis-wifiext.md) - [@ohos.wifiext (WLAN Extension)(To Be Deprecated Soon)](js-apis-wifiext.md)
- tag - tag
- [nfctech (Standard NFC Technologies)](js-apis-nfctech.md) - [nfctech (Standard NFC Technologies)](js-apis-nfctech.md)
- [tagSession (Standard NFC Tag Session)](js-apis-tagSession.md) - [tagSession (Standard NFC Tag Session)](js-apis-tagSession.md)
...@@ -340,7 +342,7 @@ ...@@ -340,7 +342,7 @@
- [@ohos.systemParameterEnhance (System Parameter)](js-apis-system-parameterEnhance.md) - [@ohos.systemParameterEnhance (System Parameter)](js-apis-system-parameterEnhance.md)
- [@ohos.thermal (Thermal Management)](js-apis-thermal.md) - [@ohos.thermal (Thermal Management)](js-apis-thermal.md)
- [@ohos.update (Update)](js-apis-update.md) - [@ohos.update (Update)](js-apis-update.md)
- [@ohos.usbManager (USB Management)](js-apis-usbManager.md) - [@ohos.usbManager (USB Manager)](js-apis-usbManager.md)
- [@ohos.vibrator (Vibrator)](js-apis-vibrator.md) - [@ohos.vibrator (Vibrator)](js-apis-vibrator.md)
- Account Management - Account Management
...@@ -390,7 +392,6 @@ ...@@ -390,7 +392,6 @@
- APIs No Longer Maintained - APIs No Longer Maintained
- [@ohos.backgroundTaskManager (Background Task Management)](js-apis-backgroundTaskManager.md) - [@ohos.backgroundTaskManager (Background Task Management)](js-apis-backgroundTaskManager.md)
- [@ohos.bluetooth (Bluetooth)](js-apis-bluetooth.md)
- [@ohos.bundle (Bundle)](js-apis-Bundle.md) - [@ohos.bundle (Bundle)](js-apis-Bundle.md)
- [@ohos.bundle.innerBundleManager (innerBundleManager)](js-apis-Bundle-InnerBundleManager.md) - [@ohos.bundle.innerBundleManager (innerBundleManager)](js-apis-Bundle-InnerBundleManager.md)
- [@ohos.bundleState (Device Usage Statistics)](js-apis-deviceUsageStatistics.md) - [@ohos.bundleState (Device Usage Statistics)](js-apis-deviceUsageStatistics.md)
......
...@@ -79,7 +79,7 @@ try { ...@@ -79,7 +79,7 @@ try {
} }
}); });
} catch (paramError) { } catch (paramError) {
console.error('error.code: ${JSON.stringify(paramError.code)}, error.message: ${JSON.stringify(paramError.message)}'); console.error('error.code: ${paramError.code}, error.message: ${paramError.message}');
} }
``` ```
...@@ -135,7 +135,7 @@ try { ...@@ -135,7 +135,7 @@ try {
console.error('updateConfiguration fail, err: ${JSON.stringify(err)}'); console.error('updateConfiguration fail, err: ${JSON.stringify(err)}');
}); });
} catch (paramError) { } catch (paramError) {
console.error('error.code: ${JSON.stringify(paramError.code)}, error.message: ${JSON.stringify(paramError.message)}'); console.error('error.code: ${paramError.code}, error.message: ${paramError.message}');
} }
``` ```
...@@ -177,7 +177,7 @@ try { ...@@ -177,7 +177,7 @@ try {
} }
}); });
} catch (paramError) { } catch (paramError) {
console.error('error.code: ${JSON.stringify(paramError.code)}, error.message: ${JSON.stringify(paramError.message)}'); console.error('error.code: ${paramError.code}, error.message: ${paramError.message}');
} }
``` ```
...@@ -217,7 +217,7 @@ try { ...@@ -217,7 +217,7 @@ try {
console.error('getAbilityRunningInfos fail, err: ${JSON.stringify(err)}'); console.error('getAbilityRunningInfos fail, err: ${JSON.stringify(err)}');
}); });
} catch (paramError) { } catch (paramError) {
console.error('error.code: ${JSON.stringify(paramError.code)}, error.message: ${JSON.stringify(paramError.message)}'); console.error('error.code: ${paramError.code}, error.message: ${paramError.message}');
} }
``` ```
...@@ -262,7 +262,7 @@ try { ...@@ -262,7 +262,7 @@ try {
} }
}); });
} catch (paramError) { } catch (paramError) {
console.error('error.code: ${JSON.stringify(paramError.code)}, error.message: ${JSON.stringify(paramError.message)}'); console.error('error.code: ${paramError.code}, error.message: ${paramError.message}');
} }
``` ```
...@@ -310,7 +310,7 @@ try { ...@@ -310,7 +310,7 @@ try {
console.error('getExtensionRunningInfos fail, err: ${JSON.stringify(err)}'); console.error('getExtensionRunningInfos fail, err: ${JSON.stringify(err)}');
}); });
} catch (paramError) { } catch (paramError) {
console.error('error.code: ${JSON.stringify(paramError.code)}, error.message: ${JSON.stringify(paramError.message)}'); console.error('error.code: ${paramError.code}, error.message: ${paramError.message}');
} }
``` ```
......
...@@ -306,7 +306,7 @@ Obtains the information about a given mission. This API uses an asynchronous cal ...@@ -306,7 +306,7 @@ Obtains the information about a given mission. This API uses an asynchronous cal
missionManager.getMissionInfo('', testMissionId, (error, mission) => { missionManager.getMissionInfo('', testMissionId, (error, mission) => {
if (error) { if (error) {
console.error('getMissionInfo failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('getMissionInfo failed, error.code: ${error.code}, error.message: ${error.message}');
} else { } else {
console.log('mission.missionId = ${mission.missionId}'); console.log('mission.missionId = ${mission.missionId}');
console.log('mission.runningState = ${mission.runningState}'); console.log('mission.runningState = ${mission.runningState}');
...@@ -392,7 +392,7 @@ Obtains information about all missions. This API uses an asynchronous callback t ...@@ -392,7 +392,7 @@ Obtains information about all missions. This API uses an asynchronous callback t
try { try {
missionManager.getMissionInfos('', 10, (error, missions) => { missionManager.getMissionInfos('', 10, (error, missions) => {
if (error) { if (error) {
console.error('getMissionInfos failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('getMissionInfos failed, error.code: ${error.code}, error.message: ${error.message}');
} else { } else {
console.log('size = ${missions.length}'); console.log('size = ${missions.length}');
console.log('missions = ${JSON.stringify(missions)}'); console.log('missions = ${JSON.stringify(missions)}');
......
...@@ -33,7 +33,7 @@ import StartOptions from '@ohos.app.ability.StartOptions'; ...@@ -33,7 +33,7 @@ import StartOptions from '@ohos.app.ability.StartOptions';
try { try {
missionManager.getMissionInfos('', 10, (error, missions) => { missionManager.getMissionInfos('', 10, (error, missions) => {
if (error.code) { if (error.code) {
console.error('getMissionInfos failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('getMissionInfos failed, error.code: ${error.code}, error.message: ${error.message}');
return; return;
} }
console.log('size = ${missions.length}'); console.log('size = ${missions.length}');
......
...@@ -375,10 +375,10 @@ For details about the error codes, see [Ability Error Codes](../errorcodes/error ...@@ -375,10 +375,10 @@ For details about the error codes, see [Ability Error Codes](../errorcodes/error
console.log('Caller call() called'); console.log('Caller call() called');
}) })
.catch((callErr) => { .catch((callErr) => {
console.log('Caller.call catch error, error.code: ${JSON.stringify(callErr.code)}, error.message: ${JSON.stringify(callErr.message)}'); console.log('Caller.call catch error, error.code: ${callErr.code}, error.message: ${callErr.message}');
}); });
}).catch((err) => { }).catch((err) => {
console.log('Caller GetCaller error, error.code: ${JSON.stringify(err.code)}, error.message: ${JSON.stringify(err.message)}'); console.log('Caller GetCaller error, error.code: ${err.code}, error.message: ${err.message}');
}); });
} }
} }
...@@ -456,10 +456,10 @@ For details about the error codes, see [Ability Error Codes](../errorcodes/error ...@@ -456,10 +456,10 @@ For details about the error codes, see [Ability Error Codes](../errorcodes/error
data.readParcelable(retmsg); data.readParcelable(retmsg);
}) })
.catch((callErr) => { .catch((callErr) => {
console.log('Caller.callWithResult catch error, error.code: ${JSON.stringify(callErr.code)}, error.message: ${JSON.stringify(callErr.message)}'); console.log('Caller.callWithResult catch error, error.code: ${callErr.code}, error.message: ${callErr.message}');
}); });
}).catch((err) => { }).catch((err) => {
console.log('Caller GetCaller error, error.code: ${JSON.stringify(err.code)}, error.message: ${JSON.stringify(err.message)}'); console.log('Caller GetCaller error, error.code: ${err.code}, error.message: ${err.message}');
}); });
} }
} }
...@@ -498,10 +498,10 @@ Releases the caller interface of the target ability. ...@@ -498,10 +498,10 @@ Releases the caller interface of the target ability.
try { try {
caller.release(); caller.release();
} catch (releaseErr) { } catch (releaseErr) {
console.log('Caller.release catch error, error.code: ${JSON.stringify(releaseErr.code)}, error.message: ${JSON.stringify(releaseErr.message)}'); console.log('Caller.release catch error, error.code: ${releaseErr.code}, error.message: ${releaseErr.message}');
} }
}).catch((err) => { }).catch((err) => {
console.log('Caller GetCaller error, error.code: ${JSON.stringify(err.code)}, error.message: ${JSON.stringify(err.message)}'); console.log('Caller GetCaller error, error.code: ${err.code}, error.message: ${err.message}');
}); });
} }
} }
...@@ -538,10 +538,10 @@ Registers a callback that is invoked when the stub on the target ability is disc ...@@ -538,10 +538,10 @@ Registers a callback that is invoked when the stub on the target ability is disc
console.log(' Caller OnRelease CallBack is called ${str}'); console.log(' Caller OnRelease CallBack is called ${str}');
}); });
} catch (error) { } catch (error) {
console.log('Caller.onRelease catch error, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.log('Caller.onRelease catch error, error.code: ${error.code}, error.message: ${error.message}');
} }
}).catch((err) => { }).catch((err) => {
console.log('Caller GetCaller error, error.code: ${JSON.stringify(err.code)}, error.message: ${JSON.stringify(err.message)}'); console.log('Caller GetCaller error, error.code: ${err.code}, error.message: ${err.message}');
}); });
} }
} }
...@@ -587,10 +587,10 @@ For details about the error codes, see [Ability Error Codes](../errorcodes/error ...@@ -587,10 +587,10 @@ For details about the error codes, see [Ability Error Codes](../errorcodes/error
console.log(' Caller OnRelease CallBack is called ${str}'); console.log(' Caller OnRelease CallBack is called ${str}');
}); });
} catch (error) { } catch (error) {
console.log('Caller.on catch error, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.log('Caller.on catch error, error.code: ${error.code}, error.message: ${error.message}');
} }
}).catch((err) => { }).catch((err) => {
console.log('Caller GetCaller error, error.code: ${JSON.stringify(err.code)}, error.message: ${JSON.stringify(err.message)}'); console.log('Caller GetCaller error, error.code: ${err.code}, error.message: ${err.message}');
}); });
} }
} }
...@@ -637,10 +637,10 @@ For other IDs, see [Ability Error Codes](../errorcodes/errorcode-ability.md). ...@@ -637,10 +637,10 @@ For other IDs, see [Ability Error Codes](../errorcodes/errorcode-ability.md).
caller.on('release', onReleaseCallBack); caller.on('release', onReleaseCallBack);
caller.off('release', onReleaseCallBack); caller.off('release', onReleaseCallBack);
} catch (error) { } catch (error) {
console.log('Caller.on or Caller.off catch error, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.log('Caller.on or Caller.off catch error, error.code: ${error.code}, error.message: ${error.message}');
} }
}).catch((err) => { }).catch((err) => {
console.log('Caller GetCaller error, error.code: ${JSON.stringify(err.code)}, error.message: ${JSON.stringify(err.message)}'); console.log('Caller GetCaller error, error.code: ${err.code}, error.message: ${err.message}');
}); });
} }
} }
...@@ -686,10 +686,10 @@ For other IDs, see [Ability Error Codes](../errorcodes/errorcode-ability.md). ...@@ -686,10 +686,10 @@ For other IDs, see [Ability Error Codes](../errorcodes/errorcode-ability.md).
caller.on('release', onReleaseCallBack); caller.on('release', onReleaseCallBack);
caller.off('release'); caller.off('release');
} catch (error) { } catch (error) {
console.error('Caller.on or Caller.off catch error, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('Caller.on or Caller.off catch error, error.code: ${error.code}, error.message: ${error.message}');
} }
}).catch((err) => { }).catch((err) => {
console.error('Caller GetCaller error, error.code: ${JSON.stringify(err.code)}, error.message: ${JSON.stringify(err.message)}'); console.error('Caller GetCaller error, error.code: ${err.code}, error.message: ${err.message}');
}); });
} }
} }
...@@ -759,7 +759,7 @@ For details about the error codes, see [Ability Error Codes](../errorcodes/error ...@@ -759,7 +759,7 @@ For details about the error codes, see [Ability Error Codes](../errorcodes/error
try { try {
this.callee.on(method, funcCallBack); this.callee.on(method, funcCallBack);
} catch (error) { } catch (error) {
console.log('Callee.on catch error, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.log('Callee.on catch error, error.code: ${error.code}, error.message: ${error.message}');
} }
} }
} }
...@@ -798,7 +798,7 @@ For details about the error codes, see [Ability Error Codes](../errorcodes/error ...@@ -798,7 +798,7 @@ For details about the error codes, see [Ability Error Codes](../errorcodes/error
try { try {
this.callee.off(method); this.callee.off(method);
} catch (error) { } catch (error) {
console.log('Callee.off catch error, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.log('Callee.off catch error, error.code: ${error.code}, error.message: ${error.message}');
} }
} }
} }
......
...@@ -186,10 +186,10 @@ try { ...@@ -186,10 +186,10 @@ try {
WantAgent.getWantAgent(wantAgentInfo).then((data) => { WantAgent.getWantAgent(wantAgentInfo).then((data) => {
wantAgent = data; wantAgent = data;
}).catch((err) => { }).catch((err) => {
console.error('getWantAgent failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getWantAgent failed! ${err.code} ${err.message}');
}); });
} catch (err) { } catch (err) {
console.error('getWantAgent failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getWantAgent failed! ${err.code} ${err.message}');
} }
``` ```
...@@ -280,7 +280,7 @@ function getWantAgentCallback(err, data) { ...@@ -280,7 +280,7 @@ function getWantAgentCallback(err, data) {
// getBundleName callback // getBundleName callback
function getBundleNameCallback(err, data) { function getBundleNameCallback(err, data) {
if(err) { if(err) {
console.error('getBundleName failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getBundleName failed! ${err.code} ${err.message}');
} else { } else {
console.info('getBundleName ok! ${JSON.stringify(data)}'); console.info('getBundleName ok! ${JSON.stringify(data)}');
} }
...@@ -288,13 +288,13 @@ function getWantAgentCallback(err, data) { ...@@ -288,13 +288,13 @@ function getWantAgentCallback(err, data) {
try { try {
WantAgent.getBundleName(wantAgent, getBundleNameCallback); WantAgent.getBundleName(wantAgent, getBundleNameCallback);
} catch(err) { } catch(err) {
console.error('getBundleName failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getBundleName failed! ${err.code} ${err.message}');
} }
} }
try { try {
WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback); WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback);
} catch(err) { } catch(err) {
console.error('getWantAgent failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getWantAgent failed! ${err.code} ${err.message}');
} }
``` ```
...@@ -391,16 +391,16 @@ function getWantAgentCallback(err, data) { ...@@ -391,16 +391,16 @@ function getWantAgentCallback(err, data) {
WantAgent.getBundleName(wantAgent).then((data)=>{ WantAgent.getBundleName(wantAgent).then((data)=>{
console.info('getBundleName ok! ${JSON.stringify(data)}'); console.info('getBundleName ok! ${JSON.stringify(data)}');
}).catch((err)=>{ }).catch((err)=>{
console.error('getBundleName failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getBundleName failed! ${err.code} ${err.message}');
}); });
} catch(err){ } catch(err){
console.error('getBundleName failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getBundleName failed! ${err.code} ${err.message}');
} }
} }
try { try {
WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback); WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback);
} catch(err) { } catch(err) {
console.error('getWantAgent failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getWantAgent failed! ${err.code} ${err.message}');
} }
``` ```
...@@ -492,7 +492,7 @@ function getWantAgentCallback(err, data) { ...@@ -492,7 +492,7 @@ function getWantAgentCallback(err, data) {
// getUid callback // getUid callback
function getUidCallback(err, data) { function getUidCallback(err, data) {
if(err) { if(err) {
console.error('getUid failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getUid failed! ${err.code} ${err.message}');
} else { } else {
console.info('getUid ok! ${JSON.stringify(data)}'); console.info('getUid ok! ${JSON.stringify(data)}');
} }
...@@ -500,13 +500,13 @@ function getWantAgentCallback(err, data) { ...@@ -500,13 +500,13 @@ function getWantAgentCallback(err, data) {
try { try {
WantAgent.getUid(wantAgent, getUidCallback); WantAgent.getUid(wantAgent, getUidCallback);
} catch(err) { } catch(err) {
console.error('getUid failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getUid failed! ${err.code} ${err.message}');
} }
} }
try { try {
WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback); WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback);
} catch(err) { } catch(err) {
console.error('getWantAgent failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getWantAgent failed! ${err.code} ${err.message}');
} }
``` ```
...@@ -603,16 +603,16 @@ function getWantAgentCallback(err, data) { ...@@ -603,16 +603,16 @@ function getWantAgentCallback(err, data) {
WantAgent.getUid(wantAgent).then((data)=>{ WantAgent.getUid(wantAgent).then((data)=>{
console.info('getUid ok! ${JSON.stringify(data)}'); console.info('getUid ok! ${JSON.stringify(data)}');
}).catch((err)=>{ }).catch((err)=>{
console.error('getUid failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getUid failed! ${err.code} ${err.message}');
}); });
} catch(err){ } catch(err){
console.error('getUid failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getUid failed! ${err.code} ${err.message}');
} }
} }
try { try {
WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback); WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback);
} catch(err) { } catch(err) {
console.error('getWantAgent failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getWantAgent failed! ${err.code} ${err.message}');
} }
``` ```
...@@ -704,7 +704,7 @@ function getWantAgentCallback(err, data) { ...@@ -704,7 +704,7 @@ function getWantAgentCallback(err, data) {
// getWant callback // getWant callback
function getWantCallback(err, data) { function getWantCallback(err, data) {
if(err) { if(err) {
console.error('getWant failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getWant failed! ${err.code} ${err.message}');
} else { } else {
console.info('getWant ok! ${JSON.stringify(data)}'); console.info('getWant ok! ${JSON.stringify(data)}');
} }
...@@ -712,13 +712,13 @@ function getWantAgentCallback(err, data) { ...@@ -712,13 +712,13 @@ function getWantAgentCallback(err, data) {
try { try {
WantAgent.getWant(wantAgent, getWantCallback); WantAgent.getWant(wantAgent, getWantCallback);
} catch(err) { } catch(err) {
console.error('getWant failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getWant failed! ${err.code} ${err.message}');
} }
} }
try { try {
WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback); WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback);
} catch(err) { } catch(err) {
console.error('getWantAgent failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getWantAgent failed! ${err.code} ${err.message}');
} }
``` ```
...@@ -817,16 +817,16 @@ function getWantAgentCallback(err, data) { ...@@ -817,16 +817,16 @@ function getWantAgentCallback(err, data) {
WantAgent.getUid(wantAgent).then((data)=>{ WantAgent.getUid(wantAgent).then((data)=>{
console.info('getUid ok! ${JSON.stringify(data)}'); console.info('getUid ok! ${JSON.stringify(data)}');
}).catch((err)=>{ }).catch((err)=>{
console.error('getUid failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getUid failed! ${err.code} ${err.message}');
}); });
} catch(err){ } catch(err){
console.error('getUid failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getUid failed! ${err.code} ${err.message}');
} }
} }
try { try {
WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback); WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback);
} catch(err) { } catch(err) {
console.error('getWantAgent failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getWantAgent failed! ${err.code} ${err.message}');
} }
``` ```
...@@ -917,7 +917,7 @@ function getWantAgentCallback(err, data) { ...@@ -917,7 +917,7 @@ function getWantAgentCallback(err, data) {
// cancel callback // cancel callback
function cancelCallback(err, data) { function cancelCallback(err, data) {
if(err) { if(err) {
console.error('cancel failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('cancel failed! ${err.code} ${err.message}');
} else { } else {
console.info('cancel ok!'); console.info('cancel ok!');
} }
...@@ -925,13 +925,13 @@ function getWantAgentCallback(err, data) { ...@@ -925,13 +925,13 @@ function getWantAgentCallback(err, data) {
try { try {
WantAgent.cancel(wantAgent, cancelCallback); WantAgent.cancel(wantAgent, cancelCallback);
} catch(err) { } catch(err) {
console.error('cancel failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('cancel failed! ${err.code} ${err.message}');
} }
} }
try { try {
WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback); WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback);
} catch(err) { } catch(err) {
console.error('getWantAgent failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getWantAgent failed! ${err.code} ${err.message}');
} }
``` ```
...@@ -1028,16 +1028,16 @@ function getWantAgentCallback(err, data) { ...@@ -1028,16 +1028,16 @@ function getWantAgentCallback(err, data) {
WantAgent.cancel(wantAgent).then((data)=>{ WantAgent.cancel(wantAgent).then((data)=>{
console.info('cancel ok!'); console.info('cancel ok!');
}).catch((err)=>{ }).catch((err)=>{
console.error('cancel failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('cancel failed! ${err.code} ${err.message}');
}); });
} catch(err){ } catch(err){
console.error('cancel failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('cancel failed! ${err.code} ${err.message}');
} }
} }
try { try {
WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback); WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback);
} catch(err) { } catch(err) {
console.error('getWantAgent failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getWantAgent failed! ${err.code} ${err.message}');
} }
``` ```
...@@ -1131,7 +1131,7 @@ function getWantAgentCallback(err, data) { ...@@ -1131,7 +1131,7 @@ function getWantAgentCallback(err, data) {
// trigger callback // trigger callback
function triggerCallback(err, data) { function triggerCallback(err, data) {
if(err) { if(err) {
console.error('getUid failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getUid failed! ${err.code} ${err.message}');
} else { } else {
console.info('getUid ok! ${JSON.stringify(data)}'); console.info('getUid ok! ${JSON.stringify(data)}');
} }
...@@ -1139,13 +1139,13 @@ function getWantAgentCallback(err, data) { ...@@ -1139,13 +1139,13 @@ function getWantAgentCallback(err, data) {
try { try {
WantAgent.trigger(wantAgent, triggerInfo, triggerCallback); WantAgent.trigger(wantAgent, triggerInfo, triggerCallback);
} catch(err) { } catch(err) {
console.error('getUid failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getUid failed! ${err.code} ${err.message}');
} }
} }
try { try {
WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback); WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback);
} catch(err) { } catch(err) {
console.error('getWantAgent failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getWantAgent failed! ${err.code} ${err.message}');
} }
``` ```
...@@ -1239,7 +1239,7 @@ function getWantAgentCallback(err, data) { ...@@ -1239,7 +1239,7 @@ function getWantAgentCallback(err, data) {
// equal callback // equal callback
function equalCallback(err, data) { function equalCallback(err, data) {
if(err) { if(err) {
console.error('equal failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('equal failed! ${err.code} ${err.message}');
} else { } else {
console.info('equal ok! ${JSON.stringify(data)}'); console.info('equal ok! ${JSON.stringify(data)}');
} }
...@@ -1247,13 +1247,13 @@ function getWantAgentCallback(err, data) { ...@@ -1247,13 +1247,13 @@ function getWantAgentCallback(err, data) {
try { try {
WantAgent.equal(wantAgent1,wantAgent2,equalCallback); WantAgent.equal(wantAgent1,wantAgent2,equalCallback);
} catch(err) { } catch(err) {
console.error('equal failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('equal failed! ${err.code} ${err.message}');
} }
} }
try { try {
WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback); WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback);
} catch(err) { } catch(err) {
console.error('getWantAgent failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getWantAgent failed! ${err.code} ${err.message}');
} }
``` ```
...@@ -1353,16 +1353,16 @@ function getWantAgentCallback(err, data) { ...@@ -1353,16 +1353,16 @@ function getWantAgentCallback(err, data) {
WantAgent.equal(wantAgent1,wantAgent2).then((data)=>{ WantAgent.equal(wantAgent1,wantAgent2).then((data)=>{
console.info('equal ok! ${JSON.stringify(data)}'); console.info('equal ok! ${JSON.stringify(data)}');
}).catch((err)=>{ }).catch((err)=>{
console.error('equal failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('equal failed! ${err.code} ${err.message}');
}) })
} catch(err){ } catch(err){
console.error('equal failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('equal failed! ${err.code} ${err.message}');
} }
} }
try { try {
WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback); WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback);
} catch(err) { } catch(err) {
console.error('getWantAgent failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getWantAgent failed! ${err.code} ${err.message}');
} }
``` ```
...@@ -1451,7 +1451,7 @@ function getWantAgentCallback(err, data) { ...@@ -1451,7 +1451,7 @@ function getWantAgentCallback(err, data) {
// getOperationTypeCallback callback // getOperationTypeCallback callback
function getOperationTypeCallback(err, data) { function getOperationTypeCallback(err, data) {
if(err) { if(err) {
console.error('getOperationType failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getOperationType failed! ${err.code} ${err.message}');
} else { } else {
console.info('getOperationType ok! ${JSON.stringify(data)}'); console.info('getOperationType ok! ${JSON.stringify(data)}');
} }
...@@ -1459,13 +1459,13 @@ function getWantAgentCallback(err, data) { ...@@ -1459,13 +1459,13 @@ function getWantAgentCallback(err, data) {
try { try {
WantAgent.getOperationTypeCallback(wantAgent, getOperationTypeCallback); WantAgent.getOperationTypeCallback(wantAgent, getOperationTypeCallback);
} catch(err) { } catch(err) {
console.error('getOperationTypeCallback failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getOperationTypeCallback failed! ${err.code} ${err.message}');
} }
} }
try { try {
WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback); WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback);
} catch(err) { } catch(err) {
console.error('getWantAgent failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getWantAgent failed! ${err.code} ${err.message}');
} }
``` ```
...@@ -1560,16 +1560,16 @@ function getWantAgentCallback(err, data) { ...@@ -1560,16 +1560,16 @@ function getWantAgentCallback(err, data) {
WantAgent.getOperationType(wantAgent).then((data)=>{ WantAgent.getOperationType(wantAgent).then((data)=>{
console.info('getOperationType ok! ${JSON.stringify(data)}'); console.info('getOperationType ok! ${JSON.stringify(data)}');
}).catch((err)=>{ }).catch((err)=>{
console.error('getOperationType failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getOperationType failed! ${err.code} ${err.message}');
}); });
} catch(err){ } catch(err){
console.error('getOperationType failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getOperationType failed! ${err.code} ${err.message}');
} }
} }
try { try {
WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback); WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback);
} catch(err) { } catch(err) {
console.error('getWantAgent failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}'); console.error('getWantAgent failed! ${err.code} ${err.message}');
} }
``` ```
......
...@@ -170,7 +170,7 @@ Obtains the information about a given mission. This API uses an asynchronous cal ...@@ -170,7 +170,7 @@ Obtains the information about a given mission. This API uses an asynchronous cal
let allMissions=missionManager.getMissionInfos('',10).catch(function(err){console.log(err);}); let allMissions=missionManager.getMissionInfos('',10).catch(function(err){console.log(err);});
missionManager.getMissionInfo('', allMissions[0].missionId, (error, mission) => { missionManager.getMissionInfo('', allMissions[0].missionId, (error, mission) => {
if (error.code) { if (error.code) {
console.error('getMissionInfo failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('getMissionInfo failed, error.code: ${error.code}, error.message: ${error.message}');
return; return;
} }
...@@ -247,7 +247,7 @@ Obtains information about all missions. This API uses an asynchronous callback t ...@@ -247,7 +247,7 @@ Obtains information about all missions. This API uses an asynchronous callback t
missionManager.getMissionInfos('', 10, (error, missions) => { missionManager.getMissionInfos('', 10, (error, missions) => {
if (error.code) { if (error.code) {
console.error('getMissionInfos failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('getMissionInfos failed, error.code: ${error.code}, error.message: ${error.message}');
return; return;
} }
console.log('size = ${missions.length}'); console.log('size = ${missions.length}');
...@@ -319,7 +319,7 @@ Obtains the snapshot of a given mission. This API uses an asynchronous callback ...@@ -319,7 +319,7 @@ Obtains the snapshot of a given mission. This API uses an asynchronous callback
missionManager.getMissionInfos('', 10, (error, missions) => { missionManager.getMissionInfos('', 10, (error, missions) => {
if (error.code) { if (error.code) {
console.error('getMissionInfos failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('getMissionInfos failed, error.code: ${error.code}, error.message: ${error.message}');
return; return;
} }
console.log('size = ${missions.length}'); console.log('size = ${missions.length}');
...@@ -328,7 +328,7 @@ Obtains the snapshot of a given mission. This API uses an asynchronous callback ...@@ -328,7 +328,7 @@ Obtains the snapshot of a given mission. This API uses an asynchronous callback
missionManager.getMissionSnapShot('', id, (error, snapshot) => { missionManager.getMissionSnapShot('', id, (error, snapshot) => {
if (error.code) { if (error.code) {
console.error('getMissionSnapShot failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('getMissionSnapShot failed, error.code: ${error.code}, error.message: ${error.message}');
return; return;
} }
console.log('bundleName = ${snapshot.ability.bundleName}'); console.log('bundleName = ${snapshot.ability.bundleName}');
...@@ -408,7 +408,7 @@ Locks a given mission. This API uses an asynchronous callback to return the resu ...@@ -408,7 +408,7 @@ Locks a given mission. This API uses an asynchronous callback to return the resu
missionManager.getMissionInfos('', 10, (error, missions) => { missionManager.getMissionInfos('', 10, (error, missions) => {
if (error.code) { if (error.code) {
console.error('getMissionInfos failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('getMissionInfos failed, error.code: ${error.code}, error.message: ${error.message}');
return; return;
} }
console.log('size = ${missions.length}'); console.log('size = ${missions.length}');
...@@ -492,7 +492,7 @@ Unlocks a given mission. This API uses an asynchronous callback to return the re ...@@ -492,7 +492,7 @@ Unlocks a given mission. This API uses an asynchronous callback to return the re
missionManager.getMissionInfos('', 10, (error, missions) => { missionManager.getMissionInfos('', 10, (error, missions) => {
if (error.code) { if (error.code) {
console.error('getMissionInfos failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('getMissionInfos failed, error.code: ${error.code}, error.message: ${error.message}');
return; return;
} }
console.log('size = ${missions.length}'); console.log('size = ${missions.length}');
...@@ -580,7 +580,7 @@ Clears a given mission, regardless of whether it is locked. This API uses an asy ...@@ -580,7 +580,7 @@ Clears a given mission, regardless of whether it is locked. This API uses an asy
missionManager.getMissionInfos('', 10, (error, missions) => { missionManager.getMissionInfos('', 10, (error, missions) => {
if (error.code) { if (error.code) {
console.error('getMissionInfos failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('getMissionInfos failed, error.code: ${error.code}, error.message: ${error.message}');
return; return;
} }
console.log('size = ${missions.length}'); console.log('size = ${missions.length}');
...@@ -716,7 +716,7 @@ Switches a given mission to the foreground. This API uses an asynchronous callba ...@@ -716,7 +716,7 @@ Switches a given mission to the foreground. This API uses an asynchronous callba
missionManager.getMissionInfos('', 10, (error, missions) => { missionManager.getMissionInfos('', 10, (error, missions) => {
if (error.code) { if (error.code) {
console.error('getMissionInfos failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('getMissionInfos failed, error.code: ${error.code}, error.message: ${error.message}');
return; return;
} }
console.log('size = ${missions.length}'); console.log('size = ${missions.length}');
...@@ -757,7 +757,7 @@ Switches a given mission to the foreground, with the startup parameters for the ...@@ -757,7 +757,7 @@ Switches a given mission to the foreground, with the startup parameters for the
missionManager.getMissionInfos('', 10, (error, missions) => { missionManager.getMissionInfos('', 10, (error, missions) => {
if (error.code) { if (error.code) {
console.error('getMissionInfos failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('getMissionInfos failed, error.code: ${error.code}, error.message: ${error.message}');
return; return;
} }
console.log('size = ${missions.length}'); console.log('size = ${missions.length}');
......
...@@ -547,7 +547,7 @@ startBluetoothDiscovery(): void ...@@ -547,7 +547,7 @@ startBluetoothDiscovery(): void
Starts Bluetooth scan to discover remote devices. Starts Bluetooth scan to discover remote devices.
**Rquired permissions**: ohos.permission.DISCOVER_BLUETOOTH and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION **Required permissions**: ohos.permission.DISCOVER_BLUETOOTH and ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
**System capability**: SystemCapability.Communication.Bluetooth.Core **System capability**: SystemCapability.Communication.Bluetooth.Core
...@@ -652,6 +652,98 @@ try { ...@@ -652,6 +652,98 @@ try {
``` ```
## bluetoothManager.setDevicePinCode<sup>10+</sup><a name="setDevicePinCode"></a>
setDevicePinCode(device: string, code: string, callback: AsyncCallback&lt;void&gt;): void
Sets the PIN for the device when [PinType](#pintype10) is **PIN_TYPE_ENTER_PIN_CODE** or **PIN_TYPE_PIN_16_DIGITS**.
**Required permissions**: ohos.permission.MANAGE_BLUETOOTH
**System capability**: SystemCapability.Communication.Bluetooth.Core
**Parameters**
| Name | Type | Mandatory | Description |
| ------ | ------- | ---- | -------------------------------- |
| device | string | Yes | MAC address of the remote device, for example, XX:XX:XX:XX:XX:XX.|
| code | string | Yes | PIN to set. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. If the operation is successful, **err** is **undefined**. Otherwise, **err** is an error object. |
**Error codes**
For details about the error codes, see [Bluetooth Error Codes](../errorcodes/errorcode-bluetoothManager.md).
| ID| Error Message|
| -------- | ---------------------------- |
|2900001 | Service stopped. |
|2900003 | Bluetooth switch is off. |
|2900099 | Operation failed. |
**Example**
```js
//callback
try {
bluetoothManager.setDevicePinCode('11:22:33:44:55:66', '12345', (err, data) => {
console.info('setDevicePinCode,device name err:' + JSON.stringify(err) + ',device name:' + JSON.stringify(data));
});
} catch (err) {
console.error("errCode:" + err.code + ",errMessage:" + err.message);
}
```
## bluetoothManager.setDevicePinCode<sup>10+</sup><a name="setDevicePinCode"></a>
setDevicePinCode(device: string, code: string): Promise&lt;void&gt;
Sets the PIN for the device when [PinType](#pintype10) is **PIN_TYPE_ENTER_PIN_CODE** or **PIN_TYPE_PIN_16_DIGITS**. This API uses a promise to return the result.
**Required permissions**: ohos.permission.MANAGE_BLUETOOTH
**System capability**: SystemCapability.Communication.Bluetooth.Core
**Parameters**
| Name | Type | Mandatory | Description |
| ------ | ------- | ---- | -------------------------------- |
| device | string | Yes | MAC address of the remote device, for example, XX:XX:XX:XX:XX:XX.|
| code | string | Yes | PIN to set. |
**Return value**
| Type | Description |
| ------------------- | ------------- |
| Promise&lt;void&gt; | Promise used to return the result.|
**Error codes**
For details about the error codes, see [Bluetooth Error Codes](../errorcodes/errorcode-bluetoothManager.md).
| ID| Error Message|
| -------- | ---------------------------- |
|2900001 | Service stopped. |
|2900003 | Bluetooth switch is off. |
|2900099 | Operation failed. |
**Example**
```js
//promise
try {
bluetoothManager.setDevicePinCode('11:22:33:44:55:66', '12345').then(() => {
console.info('setDevicePinCode');
}, error => {
console.info('setDevicePinCode: errCode:' + error.code + ',errMessage' + error.message);
})
} catch (err) {
console.error("errCode:" + err.code + ",errMessage:" + err.message);
}
```
## bluetoothManager.on('bluetoothDeviceFind') ## bluetoothManager.on('bluetoothDeviceFind')
on(type: "bluetoothDeviceFind", callback: Callback&lt;Array&lt;string&gt;&gt;): void on(type: "bluetoothDeviceFind", callback: Callback&lt;Array&lt;string&gt;&gt;): void
...@@ -1385,7 +1477,7 @@ Creates a **GattServer** instance. ...@@ -1385,7 +1477,7 @@ Creates a **GattServer** instance.
| Type | Description | | Type | Description |
| ------------------------- | ------------------------------------ | | ------------------------- | ------------------------------------ |
| [GattServer](#gattserver) | **GattServer** instance created. Before using an API of the server, you must create a **GattSever** instance.| | [GattServer](#gattserver) | **GattServer** instance created. Before using an API of this class, you must create a **GattSever** instance.|
**Example** **Example**
...@@ -2333,17 +2425,6 @@ Obtains the network sharing status. ...@@ -2333,17 +2425,6 @@ Obtains the network sharing status.
| --------------------- | --------------------------------- | | --------------------- | --------------------------------- |
| boolean | Returns **true** if tethering is available over a Bluetooth PAN; return **false** otherwise.| | boolean | Returns **true** if tethering is available over a Bluetooth PAN; return **false** otherwise.|
**Error codes**
For details about the error codes, see [Bluetooth Error Codes](../errorcodes/errorcode-bluetoothManager.md).
| ID| Error Message|
| -------- | ---------------------------- |
|2900001 | Service stopped. |
|2900003 | Bluetooth switch is off. |
|2900004 | Profile is not supported. |
|2900099 | Operation failed. |
**Example** **Example**
```js ```js
...@@ -3258,7 +3339,7 @@ For details about the error codes, see [Bluetooth Error Codes](../errorcodes/err ...@@ -3258,7 +3339,7 @@ For details about the error codes, see [Bluetooth Error Codes](../errorcodes/err
| ID| Error Message| | ID| Error Message|
| -------- | ---------------------------- | | -------- | ---------------------------- |
|2900001 | Service stopped. | |2900001 | Service stopped. |
|2901000 | Read forbidden. | |2901000 | Read forbidden. |
|2900099 | Operation failed. | |2900099 | Operation failed. |
**Example** **Example**
...@@ -3327,7 +3408,7 @@ For details about the error codes, see [Bluetooth Error Codes](../errorcodes/err ...@@ -3327,7 +3408,7 @@ For details about the error codes, see [Bluetooth Error Codes](../errorcodes/err
| ID| Error Message| | ID| Error Message|
| -------- | ---------------------------- | | -------- | ---------------------------- |
|2900001 | Service stopped. | |2900001 | Service stopped. |
|2901000 | Read forbidden. | |2901000 | Read forbidden. |
|2900099 | Operation failed. | |2900099 | Operation failed. |
**Example** **Example**
...@@ -3382,7 +3463,7 @@ For details about the error codes, see [Bluetooth Error Codes](../errorcodes/err ...@@ -3382,7 +3463,7 @@ For details about the error codes, see [Bluetooth Error Codes](../errorcodes/err
| ID| Error Message| | ID| Error Message|
| -------- | ---------------------------- | | -------- | ---------------------------- |
|2900001 | Service stopped. | |2900001 | Service stopped. |
|2901000 | Read forbidden. | |2901000 | Read forbidden. |
|2900099 | Operation failed. | |2900099 | Operation failed. |
**Example** **Example**
...@@ -3444,7 +3525,7 @@ For details about the error codes, see [Bluetooth Error Codes](../errorcodes/err ...@@ -3444,7 +3525,7 @@ For details about the error codes, see [Bluetooth Error Codes](../errorcodes/err
| ID| Error Message| | ID| Error Message|
| -------- | ---------------------------- | | -------- | ---------------------------- |
|2900001 | Service stopped. | |2900001 | Service stopped. |
|2901000 | Read forbidden. | |2901000 | Read forbidden. |
|2900099 | Operation failed. | |2900099 | Operation failed. |
**Example** **Example**
...@@ -3491,7 +3572,7 @@ For details about the error codes, see [Bluetooth Error Codes](../errorcodes/err ...@@ -3491,7 +3572,7 @@ For details about the error codes, see [Bluetooth Error Codes](../errorcodes/err
| ID| Error Message| | ID| Error Message|
| -------- | ---------------------------- | | -------- | ---------------------------- |
|2900001 | Service stopped. | |2900001 | Service stopped. |
|2901001 | Write forbidden. | |2901001 | Write forbidden. |
|2900099 | Operation failed. | |2900099 | Operation failed. |
**Example** **Example**
...@@ -3545,7 +3626,7 @@ For details about the error codes, see [Bluetooth Error Codes](../errorcodes/err ...@@ -3545,7 +3626,7 @@ For details about the error codes, see [Bluetooth Error Codes](../errorcodes/err
| ID| Error Message| | ID| Error Message|
| -------- | ---------------------------- | | -------- | ---------------------------- |
|2900001 | Service stopped. | |2900001 | Service stopped. |
|2901001 | Write forbidden. | |2901001 | Write forbidden. |
|2900099 | Operation failed. | |2900099 | Operation failed. |
**Example** **Example**
...@@ -4016,17 +4097,18 @@ Defines the characteristic API parameters. ...@@ -4016,17 +4097,18 @@ Defines the characteristic API parameters.
**System capability**: SystemCapability.Communication.Bluetooth.Core **System capability**: SystemCapability.Communication.Bluetooth.Core
| Name | Type | Readable | Writable | Description | | Name | Type | Readable | Writable | Description |
| ------------------- | ---------------------------------------- | ---- | ---- | ---------------------------------------- | | ------------------- | ---------------------------------------- | ---- | ---- | ---------------------------------------- |
| serviceUuid | string | Yes | Yes | UUID of the service, for example, **00001888-0000-1000-8000-00805f9b34fb**.| | serviceUuid | string | Yes | Yes | UUID of the service, for example, **00001888-0000-1000-8000-00805f9b34fb**.|
| characteristicUuid | string | Yes | Yes | UUID of the characteristic, for example, **00002a11-0000-1000-8000-00805f9b34fb**.| | characteristicUuid | string | Yes | Yes | UUID of the characteristic, for example, **00002a11-0000-1000-8000-00805f9b34fb**.|
| characteristicValue | ArrayBuffer | Yes | Yes | Binary value of the characteristic. | | characteristicValue | ArrayBuffer | Yes | Yes | Binary value of the characteristic. |
| descriptors | Array&lt;[BLEDescriptor](#bledescriptor)&gt; | Yes | Yes | List of descriptors of the characteristic. | | descriptors | Array&lt;[BLEDescriptor](#bledescriptor)&gt; | Yes | Yes | List of descriptors of the characteristic. |
| properties<sup>10+</sup> | [GattProperties](#gattproperties10) | Yes | Yes | Properties of the characteristic. |
## BLEDescriptor ## BLEDescriptor
Defines the descriptor API parameters. Defines the BLE descriptor.
**System capability**: SystemCapability.Communication.Bluetooth.Core **System capability**: SystemCapability.Communication.Bluetooth.Core
...@@ -4229,6 +4311,7 @@ Defines the scan result. ...@@ -4229,6 +4311,7 @@ Defines the scan result.
| deviceId | string | Yes | No | Address of the scanned device, for example, XX:XX:XX:XX:XX:XX.| | deviceId | string | Yes | No | Address of the scanned device, for example, XX:XX:XX:XX:XX:XX.|
| rssi | number | Yes | No | RSSI of the device. | | rssi | number | Yes | No | RSSI of the device. |
| data | ArrayBuffer | Yes | No | Advertisement packets sent by the device. | | data | ArrayBuffer | Yes | No | Advertisement packets sent by the device. |
| deviceName<sup>10+</sup> | string | Yes | No | Name of the device detected. |
## BluetoothState ## BluetoothState
...@@ -4308,6 +4391,7 @@ Defines the pairing request parameters. ...@@ -4308,6 +4391,7 @@ Defines the pairing request parameters.
| -------- | ------ | ---- | ---- | ----------- | | -------- | ------ | ---- | ---- | ----------- |
| deviceId | string | Yes | No | ID of the device to pair.| | deviceId | string | Yes | No | ID of the device to pair.|
| pinCode | string | Yes | No | Key for the device pairing. | | pinCode | string | Yes | No | Key for the device pairing. |
| pinType<sup>10+</sup> | [PinType](#pintype10) | Yes | No | Type of the device to pair. |
## BondStateParam<a name="BondStateParam"></a> ## BondStateParam<a name="BondStateParam"></a>
...@@ -4334,6 +4418,21 @@ Defines the profile state change parameters. ...@@ -4334,6 +4418,21 @@ Defines the profile state change parameters.
| state | [ProfileConnectionState](#profileconnectionstate) | Yes | No | Profile connection state of the device.| | state | [ProfileConnectionState](#profileconnectionstate) | Yes | No | Profile connection state of the device.|
## GattProperties<sup>10+</sup><a name="GattProperties"></a>
Defines the properties of a GATT characteristic.
**System capability**: SystemCapability.Communication.Bluetooth.Core
| Name | Type | Read-only | Mandatory | Description |
| -------- | ------ | ---- | ---- | ----------- |
| write<sup>10+</sup> | boolean | Yes | Yes | Permits writes of the characteristic value (with a response).|
| writeNoResponse<sup>10+</sup> | boolean | Yes | Yes | Permits writes of the characteristic value (without a response).|
| read<sup>10+</sup> | boolean | Yes | Yes | Permits reads of the characteristic value.|
| notify<sup>10+</sup> | boolean | Yes | Yes | Permits notifications of the characteristic value.|
| indicate<sup>10+</sup> | boolean | Yes | Yes | Permits notifications of the characteristic value without acknowledgement.|
## DeviceClass<a name="DeviceClass"></a> ## DeviceClass<a name="DeviceClass"></a>
Defines the class of a Bluetooth device. Defines the class of a Bluetooth device.
...@@ -4347,7 +4446,6 @@ Defines the class of a Bluetooth device. ...@@ -4347,7 +4446,6 @@ Defines the class of a Bluetooth device.
| classOfDevice | number | Yes | No | Class of the device. | | classOfDevice | number | Yes | No | Class of the device. |
## MajorClass<a name="MajorClass"></a> ## MajorClass<a name="MajorClass"></a>
Enumerates the major classes of Bluetooth devices. Enumerates the major classes of Bluetooth devices.
...@@ -4489,3 +4587,21 @@ Enumerates the Bluetooth profiles. API version 9 is added with **PROFILE_HID_HOS ...@@ -4489,3 +4587,21 @@ Enumerates the Bluetooth profiles. API version 9 is added with **PROFILE_HID_HOS
| PROFILE_HANDS_FREE_AUDIO_GATEWAY | 4 | HFP profile. | | PROFILE_HANDS_FREE_AUDIO_GATEWAY | 4 | HFP profile. |
| PROFILE_HID_HOST | 6 | Human Interface Device (HID) profile. | | PROFILE_HID_HOST | 6 | Human Interface Device (HID) profile. |
| PROFILE_PAN_NETWORK | 7 | PAN profile. | | PROFILE_PAN_NETWORK | 7 | PAN profile. |
## PinType<sup>10+</sup><a name="PinType"></a>
Enumerates the Bluetooth pairing types.
**System capability**: SystemCapability.Communication.Bluetooth.Core
| Name | Value | Description |
| -------------------------------- | ------ | --------------- |
| PIN_TYPE_ENTER_PIN_CODE<sup>10+</sup> | 0 | The user needs to enter the PIN displayed on the peer device.|
| PIN_TYPE_ENTER_PASSKEY<sup>10+</sup> | 1 | The user needs to enter the PASSKEY displayed on the peer device. |
| PIN_TYPE_CONFIRM_PASSKEY<sup>10+</sup> | 2 | The user needs to confirm the PASSKEY displayed on the local device. |
| PIN_TYPE_NO_PASSKEY_CONSENT<sup>10+</sup> | 3 | There is no PASSKEY, and the user needs to accept or reject the pairing request. |
| PIN_TYPE_NOTIFY_PASSKEY<sup>10+</sup> | 4 | The user needs to enter the PASSKEY displayed on the local device on the peer device. |
| PIN_TYPE_DISPLAY_PIN_CODE<sup>10+</sup> | 5 | The user needs to enter the PIN displayed on the peer device for Bluetooth 2.0 devices. |
| PIN_TYPE_OOB_CONSENT<sup>10+</sup> | 6 | The user needs to accept or reject the out of band (OOB) pairing request. |
| PIN_TYPE_PIN_16_DIGITS<sup>10+</sup> | 7 | The user needs to enter the 16-digit PIN displayed on the peer device. |
...@@ -5,6 +5,8 @@ The **BundlePackInfo** module provides information in the **pack.info** file. Th ...@@ -5,6 +5,8 @@ The **BundlePackInfo** module provides information in the **pack.info** file. Th
> **NOTE** > **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 APIs provided by this module are system APIs.
## BundlePackInfo ## BundlePackInfo
...@@ -63,10 +65,10 @@ The **BundlePackInfo** module provides information in the **pack.info** file. Th ...@@ -63,10 +65,10 @@ The **BundlePackInfo** module provides information in the **pack.info** file. Th
| ------------------ | ------------------------------------------------- | ---- | ---- | ---------------------------------- | | ------------------ | ------------------------------------------------- | ---- | ---- | ---------------------------------- |
| mainAbility | string | Yes| No| Name of the main ability.| | mainAbility | string | Yes| No| Name of the main ability.|
| apiVersion | [ApiVersion](#apiversion) | Yes | No | API version of the module. | | apiVersion | [ApiVersion](#apiversion) | Yes | No | API version of the module. |
| deviceType | Array\<string> | Yes | No | Device types supported by the module. | | deviceTypes | Array\<string> | Yes | No | Device types supported by the module. |
| distro | [ModuleDistroInfo](#moduledistroinfo) | Yes | No | Distribution information of the module. | | distro | [ModuleDistroInfo](#moduledistroinfo) | Yes | No | Distribution information of the module. |
| abilities | Array\<[ModuleAbilityInfo](#moduleabilityinfo)> | Yes | No | Ability information of the module. | | abilities | Array\<[ModuleAbilityInfo](#moduleabilityinfo)> | Yes | No | Ability information of the module. |
| extensionAbilities | Array\<[ExtensionAbilities](#extensionability)> | Yes | No | ExtensionAbility information of the module.| | extensionAbilities | Array\<[ExtensionAbility](#extensionability)> | Yes | No | ExtensionAbility information of the module.|
## ModuleDistroInfo ## ModuleDistroInfo
...@@ -123,7 +125,7 @@ The **BundlePackInfo** module provides information in the **pack.info** file. Th ...@@ -123,7 +125,7 @@ The **BundlePackInfo** module provides information in the **pack.info** file. Th
## ApiVersion ## ApiVersion
**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.FreeInstall **System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall
......
...@@ -32,3 +32,4 @@ The **ApplicationInfo** module defines the application information. A system app ...@@ -32,3 +32,4 @@ The **ApplicationInfo** module defines the application information. A system app
| appDistributionType | string | Yes | No | Distribution type of the application signing certificate. The options are **app_gallery**, **enterprise**, **os_integration**, and **crowdtesting**. | | 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**. | | 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. | | systemApp | boolean | Yes | No | Whether the application is a system application. |
| bundleType |[BundleType](js-apis-bundleManager.md#bundletype) | Yes | No | Bundle type, which can be **APP** (common application) or **ATOMIC_SERVICE** (atomic service). |
...@@ -26,3 +26,28 @@ The **HapModuleInfo** module defines the HAP module information. A system applic ...@@ -26,3 +26,28 @@ The **HapModuleInfo** module defines the HAP module information. A system applic
| deviceTypes | Array\<string> | Yes | No | Types of devices where the module can run. | | deviceTypes | Array\<string> | Yes | No | Types of devices where the module can run. |
| installationFree | boolean | Yes | No | Whether installation-free is supported. | | installationFree | boolean | Yes | No | Whether installation-free is supported. |
| hashValue | string | Yes | No | Hash value of the module. | | hashValue | string | Yes | No | Hash value of the module. |
| moduleType | [ModuleType](js-apis-bundleManager.md#moduletype) | Yes | No | Type of the module. |
| preloads | Array\<[PreloadItem](#preloaditem)> | Yes | No | Preloaded modules in the atomic service.|
| dependencies | Array\<[Dependency](#dependency)> | Yes | No | Dynamic shared libraries on which the module depends. |
## PreloadItem
Describes the preloaded module information in the atomic service.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Type | Readable| Writable| Description |
| --------- | -------------- | ---- | ---- | --------------------------- |
|moduleName | string | Yes | No | Name of the module automatically preloaded by the system.|
## Dependency
Describes the information about the dynamic shared library on which the module depends.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Type | Readable| Writable| Description |
| ----------- | ------ | ---- | ---- | ---------------------- |
| bundleName | string | Yes | No | Name of the shared bundle on which the current module depends. |
| moduleName | string | Yes | No | Module name of the shared bundle on which the current module depends.|
| versionCode | number | Yes | No | Version number of the shared bundle. |
...@@ -49,7 +49,7 @@ Enumerates the application flags, which indicate the type of application informa ...@@ -49,7 +49,7 @@ Enumerates the application flags, which indicate the type of application informa
**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 | Value | Description | | Name | Value | Description |
| ------------------------------------ | ---------- | ------------------------------------------------------------ | | ------------------------------------ | ---------- | ------------------------------------------------------------ |
...@@ -64,7 +64,7 @@ Enumerates the ability flags, which indicate the type of ability information to ...@@ -64,7 +64,7 @@ Enumerates the ability flags, which indicate the type of ability information to
**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 | Value | Description | | Name | Value | Description |
| --------------------------------- | ---------- | ------------------------------------------------------------ | | --------------------------------- | ---------- | ------------------------------------------------------------ |
...@@ -81,7 +81,7 @@ Enumerates the Extension ability flags, which indicate the type of Extension abi ...@@ -81,7 +81,7 @@ Enumerates the Extension ability flags, which indicate the type of Extension abi
**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 | Value | Description | | Name | Value | Description |
| ------------------------------------------- | ---------- | ------------------------------------------------------------ | | ------------------------------------------- | ---------- | ------------------------------------------------------------ |
...@@ -187,6 +187,39 @@ Enumerates the display orientations of the ability. This attribute applies only ...@@ -187,6 +187,39 @@ 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
Defines the version compatibility type of the shared library.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Value | Description |
| ---------------------- | ---- | -------------------------------- |
| BACKWARD_COMPATIBILITY | 1 | The shared library is backward compatible.|
### ModuleType
Enumerates the module types.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Value | Description |
| ------- | ---- | -------------------- |
| ENTRY | 1 | Main module of the application. |
| FEATURE | 2 | Dynamic feature module of the application.|
| SHARED | 3 | Dynamic shared library module of the application. |
### BundleType
Enumerates the bundle types.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Value | Description |
| -------------- | ---- | --------------- |
| APP | 0 | The bundle is a common application. |
| ATOMIC_SERVICE | 1 | The bundle is an atomic service.|
## APIs ## APIs
### bundleManager.getBundleInfoForSelf ### bundleManager.getBundleInfoForSelf
...@@ -1077,7 +1110,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -1077,7 +1110,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. |
| 17700003 | The specified extensionAbility is not found. | | 17700003 | The specified ability is not found. |
| 17700004 | The specified userId is invalid. | | 17700004 | The specified userId is invalid. |
| 17700026 | The specified bundle is disabled. | | 17700026 | The specified bundle is disabled. |
| 17700029 | The specified ability is disabled. | | 17700029 | The specified ability is disabled. |
...@@ -3036,47 +3069,3 @@ try { ...@@ -3036,47 +3069,3 @@ try {
hilog.error(0x0000, 'testTag', 'getAllSharedBundleInfo failed. Cause: %{public}s', err.message); hilog.error(0x0000, 'testTag', 'getAllSharedBundleInfo failed. Cause: %{public}s', err.message);
} }
``` ```
## CompatiblePolicy
Defines the version compatibility type of the shared library.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Value | Description |
| ---------------------- | ---- | -------------------------------- |
| BACKWARD_COMPATIBILITY | 1 | The shared library is backward compatible.|
## ModuleType
Enumerates the module types.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Value | Description |
| ------- | ---- | -------------------- |
| ENTRY | 1 | Main module of the application. |
| FEATURE | 2 | Dynamic feature module of the application.|
| SHARED | 3 | Dynamic shared library module of the application. |
## BundleType
Enumerates the bundle types.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Value | Description |
| -------------- | ---- | --------------- |
| APP | 0 | The bundle is a common application. |
| ATOMIC_SERVICE | 1 | The bundle is an atomic service.|
## AtomicServiceModuleType
Enumerates the module types of an atomic service.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Value | Description |
| ------ | ---- | --------------------------- |
| NORMAL | 0 | Page package in the atomic service. |
| MAIN | 1 | Landing page package in the atomic service.|
# @ohos.data.preferences (Preferences) # @ohos.data.preferences (User Preferences)
The **Preferences** module provides APIs for processing data in the form of key-value (KV) pairs and supports persistence of the KV pairs when required. The **user preferences** module provides APIs for processing data in the form of key-value (KV) pairs and supports persistence of the KV pairs when required.
The key is of the string type, and the value can be a number, a string, a Boolean value, or an array of numbers, strings, or Boolean values. The key is of the string type, and the value can be a number, a string, a Boolean value, or an array of numbers, strings, or Boolean values.
...@@ -176,12 +176,12 @@ The deleted **Preferences** instance cannot be used for data operations. Otherwi ...@@ -176,12 +176,12 @@ The deleted **Preferences** instance cannot be used for data operations. Otherwi
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------- | ---- | ---------------------------------------------------- | | -------- | ------------------------------------- | ---- | ---------------------------------------------------- |
| context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-inner-application-uiAbilityContext.md). | | context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-inner-application-uiAbilityContext.md). |
| name | string | Yes | Name of the **Preferences** instance to delete. | | name | string | Yes | Name of the **Preferences** instance to delete. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. If the operation is successful, **err** is **undefined**. Otherwise, **err** is an error code.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. If the operation is successful, **err** is **undefined**. Otherwise, **err** is an error code.|
**Error codes** **Error codes**
For details about the following error codes, see [Preference Error Codes](../errorcodes/errorcode-preferences.md). For details about the error codes, see [User Preference Error Codes](../errorcodes/errorcode-preferences.md).
| ID| Error Message | | ID| Error Message |
| -------- | ------------------------------| | -------- | ------------------------------|
...@@ -213,6 +213,7 @@ Stage model: ...@@ -213,6 +213,7 @@ Stage model:
```ts ```ts
import UIAbility from '@ohos.app.ability.UIAbility'; import UIAbility from '@ohos.app.ability.UIAbility';
class EntryAbility extends UIAbility { class EntryAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
try { try {
...@@ -257,7 +258,7 @@ The deleted **Preferences** instance cannot be used for data operations. Otherwi ...@@ -257,7 +258,7 @@ The deleted **Preferences** instance cannot be used for data operations. Otherwi
**Error codes** **Error codes**
For details about the following error codes, see [Preference Error Codes](../errorcodes/errorcode-preferences.md). For details about the error codes, see [User Preference Error Codes](../errorcodes/errorcode-preferences.md).
| ID| Error Message | | ID| Error Message |
| -------- | ------------------------------| | -------- | ------------------------------|
...@@ -288,6 +289,7 @@ Stage model: ...@@ -288,6 +289,7 @@ Stage model:
```ts ```ts
import UIAbility from '@ohos.app.ability.UIAbility'; import UIAbility from '@ohos.app.ability.UIAbility';
class EntryAbility extends UIAbility { class EntryAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
try{ try{
...@@ -348,6 +350,7 @@ Stage model: ...@@ -348,6 +350,7 @@ Stage model:
```ts ```ts
import UIAbility from '@ohos.app.ability.UIAbility'; import UIAbility from '@ohos.app.ability.UIAbility';
class EntryAbility extends UIAbility { class EntryAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
try { try {
...@@ -500,7 +503,7 @@ try { ...@@ -500,7 +503,7 @@ try {
promise.then((data) => { promise.then((data) => {
console.info("Got the value of 'startup'. Data: " + data); console.info("Got the value of 'startup'. Data: " + data);
}).catch((err) => { }).catch((err) => {
console.info("Failed to get value of 'startup'. code =" + err.code + ", message =" + err.message); console.info("Failed to obtain the value of 'startup'. code =" + err.code + ", message =" + err.message);
}) })
} catch(err) { } catch(err) {
console.info("Failed to obtain the value of 'startup'. code =" + err.code + ", message =" + err.message); console.info("Failed to obtain the value of 'startup'. code =" + err.code + ", message =" + err.message);
......
...@@ -299,7 +299,7 @@ try { ...@@ -299,7 +299,7 @@ try {
getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag): Promise\<BundlePackInfo>; getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag): Promise\<BundlePackInfo>;
Obtains **bundlePackInfo** based on **bundleName** and **bundleFlag**. This API uses a promise to return the result. Obtains **bundlePackInfo** based on **bundleName** and **BundlePackFlag**. This API uses a promise to return the result.
**System API**: This is a system API. **System API**: This is a system API.
......
...@@ -20,7 +20,7 @@ import appManager from '@ohos.app.ability.appManager'; ...@@ -20,7 +20,7 @@ import appManager from '@ohos.app.ability.appManager';
function getForegroundAppInfos() { function getForegroundAppInfos() {
appManager.getForegroundApplications((error, data) => { appManager.getForegroundApplications((error, data) => {
if (error && error.code) { if (error && error.code) {
console.log('getForegroundApplications failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.log('getForegroundApplications failed, error.code: ${error.code}, error.message: ${error.message}');
return; return;
} }
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
......
...@@ -62,7 +62,7 @@ let bundleContext; ...@@ -62,7 +62,7 @@ let bundleContext;
try { try {
bundleContext = this.context.createBundleContext('com.example.test'); bundleContext = this.context.createBundleContext('com.example.test');
} catch (error) { } catch (error) {
console.error('createBundleContext failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('createBundleContext failed, error.code: ${error.code}, error.message: ${error.message}');
} }
``` ```
...@@ -101,7 +101,7 @@ let moduleContext; ...@@ -101,7 +101,7 @@ let moduleContext;
try { try {
moduleContext = this.context.createModuleContext('entry'); moduleContext = this.context.createModuleContext('entry');
} catch (error) { } catch (error) {
console.error('createModuleContext failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('createModuleContext failed, error.code: ${error.code}, error.message: ${error.message}');
} }
``` ```
...@@ -141,7 +141,7 @@ let moduleContext; ...@@ -141,7 +141,7 @@ let moduleContext;
try { try {
moduleContext = this.context.createModuleContext('com.example.test', 'entry'); moduleContext = this.context.createModuleContext('com.example.test', 'entry');
} catch (error) { } catch (error) {
console.error('createModuleContext failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('createModuleContext failed, error.code: ${error.code}, error.message: ${error.message}');
} }
``` ```
...@@ -166,6 +166,6 @@ let applicationContext; ...@@ -166,6 +166,6 @@ let applicationContext;
try { try {
applicationContext = this.context.getApplicationContext(); applicationContext = this.context.getApplicationContext();
} catch (error) { } catch (error) {
console.error('getApplicationContext failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('getApplicationContext failed, error.code: ${error.code}, error.message: ${error.message}');
} }
``` ```
...@@ -38,7 +38,7 @@ Called when the mission continuation is complete. ...@@ -38,7 +38,7 @@ Called when the mission continuation is complete.
distributedMissionManager.continueMission(continueDeviceInfo, continueCallback, (error) => { distributedMissionManager.continueMission(continueDeviceInfo, continueCallback, (error) => {
if (error && error.code) { if (error && error.code) {
console.error('continueMission failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('continueMission failed, error.code: ${error.code}, error.message: ${error.message}');
} }
console.log('continueMission finished'); console.log('continueMission finished');
}); });
......
...@@ -33,7 +33,7 @@ The **ContinueDeviceInfo** module defines the parameters required for initiating ...@@ -33,7 +33,7 @@ The **ContinueDeviceInfo** module defines the parameters required for initiating
distributedMissionManager.continueMission(continueDeviceInfo, continueCallback, (error) => { distributedMissionManager.continueMission(continueDeviceInfo, continueCallback, (error) => {
if (error && error.code) { if (error && error.code) {
console.error('continueMission failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('continueMission failed, error.code: ${error.code}, error.message: ${error.message}');
} }
console.log('continueMission finished'); console.log('continueMission finished');
}); });
......
...@@ -30,6 +30,6 @@ let observer = { ...@@ -30,6 +30,6 @@ let observer = {
try { try {
errorManager.on('error', observer); errorManager.on('error', observer);
} catch (error) { } catch (error) {
console.error('registerErrorObserver failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('registerErrorObserver failed, error.code: ${error.code}, error.message: ${error.message}');
} }
``` ```
...@@ -33,7 +33,7 @@ let upperLimit = 1; ...@@ -33,7 +33,7 @@ let upperLimit = 1;
function getExtensionInfos() { function getExtensionInfos() {
abilityManager.getExtensionRunningInfos(upperLimit, (error, data) => { abilityManager.getExtensionRunningInfos(upperLimit, (error, data) => {
if (error && error.code) { if (error && error.code) {
console.error('getForegroundApplications failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('getForegroundApplications failed, error.code: ${error.code}, error.message: ${error.message}');
return; return;
} }
......
...@@ -25,7 +25,7 @@ try { ...@@ -25,7 +25,7 @@ try {
missionManager.getMissionInfo('', 1, (error, data) => { missionManager.getMissionInfo('', 1, (error, data) => {
if (error.code) { if (error.code) {
// Process service logic errors. // Process service logic errors.
console.error('getMissionInfo failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('getMissionInfo failed, error.code: ${error.code}, error.message: ${error.message}');
return; return;
} }
......
...@@ -27,7 +27,7 @@ The mission snapshot information can be obtained by using **getMissionSnapShot** ...@@ -27,7 +27,7 @@ The mission snapshot information can be obtained by using **getMissionSnapShot**
try { try {
missionManager.getMissionInfos('', 10, (error, missions) => { missionManager.getMissionInfos('', 10, (error, missions) => {
if (error.code) { if (error.code) {
console.error('getMissionInfos failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('getMissionInfos failed, error.code: ${error.code}, error.message: ${error.message}');
return; return;
} }
console.log('size = ${missions.length}'); console.log('size = ${missions.length}');
...@@ -36,7 +36,7 @@ The mission snapshot information can be obtained by using **getMissionSnapShot** ...@@ -36,7 +36,7 @@ The mission snapshot information can be obtained by using **getMissionSnapShot**
missionManager.getMissionSnapShot('', id, (err, snapshot) => { missionManager.getMissionSnapShot('', id, (err, snapshot) => {
if (err.code) { if (err.code) {
console.error('getMissionInfos failed, err.code: ${JSON.stringify(err.code)}, err.message: ${JSON.stringify(err.message)}'); console.error('getMissionInfos failed, err.code: ${err.code}, err.message: ${err.message}');
return; return;
} }
......
...@@ -54,6 +54,7 @@ Observe the following when using this API: ...@@ -54,6 +54,7 @@ Observe the following when using this API:
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
...@@ -117,6 +118,7 @@ Observe the following when using this API: ...@@ -117,6 +118,7 @@ Observe the following when using this API:
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
...@@ -189,6 +191,7 @@ Observe the following when using this API: ...@@ -189,6 +191,7 @@ Observe the following when using this API:
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
...@@ -257,6 +260,7 @@ Observe the following when using this API: ...@@ -257,6 +260,7 @@ Observe the following when using this API:
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
...@@ -324,6 +328,7 @@ Observe the following when using this API: ...@@ -324,6 +328,7 @@ Observe the following when using this API:
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
...@@ -401,6 +406,7 @@ Observe the following when using this API: ...@@ -401,6 +406,7 @@ Observe the following when using this API:
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
...@@ -471,6 +477,7 @@ Observe the following when using this API: ...@@ -471,6 +477,7 @@ Observe the following when using this API:
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
...@@ -542,6 +549,7 @@ Observe the following when using this API: ...@@ -542,6 +549,7 @@ Observe the following when using this API:
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
...@@ -621,6 +629,7 @@ Observe the following when using this API: ...@@ -621,6 +629,7 @@ Observe the following when using this API:
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
...@@ -1349,6 +1358,7 @@ let want = { ...@@ -1349,6 +1358,7 @@ let want = {
}; };
let options = { let options = {
onConnect(elementName, remote) { onConnect(elementName, remote) {
commRemote = remote;
console.info('onConnect...') console.info('onConnect...')
}, },
onDisconnect(elementName) { onDisconnect(elementName) {
...@@ -1415,6 +1425,7 @@ let want = { ...@@ -1415,6 +1425,7 @@ let want = {
let accountId = 100; let accountId = 100;
let options = { let options = {
onConnect(elementName, remote) { onConnect(elementName, remote) {
commRemote = remote;
console.info('onConnect...') console.info('onConnect...')
}, },
onDisconnect(elementName) { onDisconnect(elementName) {
...@@ -1438,7 +1449,7 @@ try { ...@@ -1438,7 +1449,7 @@ try {
disconnectServiceExtensionAbility(connection: number): Promise\<void>; disconnectServiceExtensionAbility(connection: number): Promise\<void>;
Disconnects from a ServiceExtensionAbility. This API uses a promise to return the result. Disconnects this ability from a ServiceExtensionAbility and after the successful disconnection, sets the remote object returned upon the connection to void. This API uses a promise to return the result.
**System capability**: SystemCapability.Ability.AbilityRuntime.Core **System capability**: SystemCapability.Ability.AbilityRuntime.Core
...@@ -1471,6 +1482,7 @@ let connection = 1; ...@@ -1471,6 +1482,7 @@ let connection = 1;
try { try {
this.context.disconnectServiceExtensionAbility(connection, (err) => { this.context.disconnectServiceExtensionAbility(connection, (err) => {
commRemote = null;
if (err.code) { if (err.code) {
// Process service logic errors. // Process service logic errors.
console.error(`disconnectServiceExtensionAbility failed, code is ${err.code}, message is ${err.message}`); console.error(`disconnectServiceExtensionAbility failed, code is ${err.code}, message is ${err.message}`);
...@@ -1480,6 +1492,7 @@ try { ...@@ -1480,6 +1492,7 @@ try {
console.info('disconnectServiceExtensionAbility succeed'); console.info('disconnectServiceExtensionAbility succeed');
}); });
} catch (err) { } catch (err) {
commRemote = null;
// Process input parameter errors. // Process input parameter errors.
console.error(`disconnectServiceExtensionAbility failed, code is ${err.code}, message is ${err.message}`); console.error(`disconnectServiceExtensionAbility failed, code is ${err.code}, message is ${err.message}`);
} }
...@@ -1489,7 +1502,7 @@ try { ...@@ -1489,7 +1502,7 @@ try {
disconnectServiceExtensionAbility(connection: number, callback:AsyncCallback\<void>): void; disconnectServiceExtensionAbility(connection: number, callback:AsyncCallback\<void>): void;
Disconnects from a ServiceExtensionAbility. This API uses an asynchronous callback to return the result. Disconnects this ability from a ServiceExtensionAbility and after the successful disconnection, sets the remote object returned upon the connection to void. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Ability.AbilityRuntime.Core **System capability**: SystemCapability.Ability.AbilityRuntime.Core
...@@ -1517,6 +1530,7 @@ let connection = 1; ...@@ -1517,6 +1530,7 @@ let connection = 1;
try { try {
this.context.disconnectServiceExtensionAbility(connection, (err) => { this.context.disconnectServiceExtensionAbility(connection, (err) => {
commRemote = null;
if (err.code) { if (err.code) {
// Process service logic errors. // Process service logic errors.
console.error(`disconnectServiceExtensionAbility failed, code is ${err.code}, message is ${err.message}`); console.error(`disconnectServiceExtensionAbility failed, code is ${err.code}, message is ${err.message}`);
...@@ -1526,6 +1540,7 @@ try { ...@@ -1526,6 +1540,7 @@ try {
console.info('disconnectServiceExtensionAbility succeed'); console.info('disconnectServiceExtensionAbility succeed');
}); });
} catch (err) { } catch (err) {
commRemote = null;
// Process input parameter errors. // Process input parameter errors.
console.error(`disconnectServiceExtensionAbility failed, code is ${err.code}, message is ${err.message}`); console.error(`disconnectServiceExtensionAbility failed, code is ${err.code}, message is ${err.message}`);
} }
...@@ -1569,6 +1584,7 @@ Observe the following when using this API: ...@@ -1569,6 +1584,7 @@ Observe the following when using this API:
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
...@@ -1675,6 +1691,7 @@ Observe the following when using this API: ...@@ -1675,6 +1691,7 @@ Observe the following when using this API:
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
...@@ -1746,6 +1763,7 @@ Observe the following when using this API: ...@@ -1746,6 +1763,7 @@ Observe the following when using this API:
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
...@@ -1819,6 +1837,7 @@ Observe the following when using this API: ...@@ -1819,6 +1837,7 @@ Observe the following when using this API:
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
......
...@@ -58,7 +58,7 @@ Starts an ability. This API uses an asynchronous callback to return the result. ...@@ -58,7 +58,7 @@ Starts an ability. This API uses an asynchronous callback to return the result.
this.context.startAbility(want, options, (error) => { this.context.startAbility(want, options, (error) => {
if (error.code) { if (error.code) {
// Process service logic errors. // Process service logic errors.
console.error('startAbility failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('startAbility failed, error.code: ${error.code}, error.message: ${error.message}');
return; return;
} }
// Carry out normal service processing. // Carry out normal service processing.
...@@ -66,7 +66,7 @@ Starts an ability. This API uses an asynchronous callback to return the result. ...@@ -66,7 +66,7 @@ Starts an ability. This API uses an asynchronous callback to return the result.
}); });
} catch (paramError) { } catch (paramError) {
// Process input parameter errors. // Process input parameter errors.
console.error('error.code: ${JSON.stringify(paramError.code)}, error.message: ${JSON.stringify(paramError.message)}'); console.error('error.code: ${paramError.code}, error.message: ${paramError.message}');
} }
``` ```
...@@ -110,10 +110,10 @@ Starts an ability. This API uses a promise to return the result. ...@@ -110,10 +110,10 @@ Starts an ability. This API uses a promise to return the result.
}) })
.catch((error) => { .catch((error) => {
// Process service logic errors. // Process service logic errors.
console.error('startAbility failed, error.code: ${JSON.stringify(error.code)}, error.message: ${JSON.stringify(error.message)}'); console.error('startAbility failed, error.code: ${error.code}, error.message: ${error.message}');
}); });
} catch (paramError) { } catch (paramError) {
// Process input parameter errors. // Process input parameter errors.
console.error('error.code: ${JSON.stringify(paramError.code)}, error.message: ${JSON.stringify(paramError.message)}'); console.error('error.code: ${paramError.code}, error.message: ${paramError.message}');
} }
``` ```
...@@ -31,7 +31,7 @@ try { ...@@ -31,7 +31,7 @@ try {
inputDevice.getDeviceIds((error, ids) => { inputDevice.getDeviceIds((error, ids) => {
if (error) { if (error) {
console.log(`Failed to get device list. console.log(`Failed to get device list.
error code=${JSON.stringify(err.code)} msg=${JSON.stringify(err.message)}`); error code=${err.code} msg=${err.message}`);
return; return;
} }
this.data = ids; this.data = ids;
...@@ -91,7 +91,7 @@ try { ...@@ -91,7 +91,7 @@ try {
inputDevice.getDeviceInfo(1, (error, inputDevice) => { inputDevice.getDeviceInfo(1, (error, inputDevice) => {
if (error) { if (error) {
console.log(`Failed to get device information. console.log(`Failed to get device information.
error code=${JSON.stringify(err.code)} msg=${JSON.stringify(err.message)}`); error code=${err.code} msg=${err.message}`);
return; return;
} }
console.log("The device name is: " + inputDevice.name); console.log("The device name is: " + inputDevice.name);
...@@ -421,7 +421,7 @@ try { ...@@ -421,7 +421,7 @@ try {
inputDevice.getKeyboardType(1, (error, number) => { inputDevice.getKeyboardType(1, (error, number) => {
if (error) { if (error) {
console.log(`Failed to get keyboardtype. console.log(`Failed to get keyboardtype.
error code=${JSON.stringify(err.code)} msg=${JSON.stringify(err.message)}`); error code=${err.code} msg=${err.message}`);
return; return;
} }
console.log("The keyboard type of the device is: " + number); console.log("The keyboard type of the device is: " + number);
......
...@@ -26,7 +26,7 @@ getBundleInstaller(callback: AsyncCallback\<BundleInstaller>): void; ...@@ -26,7 +26,7 @@ getBundleInstaller(callback: AsyncCallback\<BundleInstaller>): void;
Obtains a **BundleInstaller** object. This API uses an asynchronous callback to return the result. Obtains a **BundleInstaller** object. This API uses an asynchronous callback to return the result.
**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
...@@ -60,7 +60,7 @@ getBundleInstaller(): Promise\<BundleInstaller>; ...@@ -60,7 +60,7 @@ getBundleInstaller(): Promise\<BundleInstaller>;
Obtains a **BundleInstaller** object. This API uses an asynchronous callback to return the result. Obtains a **BundleInstaller** object. This API uses an asynchronous callback to return the result.
**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
...@@ -90,7 +90,7 @@ install(hapFilePaths: Array&lt;string&gt;, installParam: InstallParam, callback: ...@@ -90,7 +90,7 @@ install(hapFilePaths: Array&lt;string&gt;, installParam: InstallParam, callback:
Installs a bundle. This API uses an asynchronous callback to return the result. Installs a bundle. This API uses an asynchronous callback to return the result.
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Required permissions**: ohos.permission.INSTALL_BUNDLE **Required permissions**: ohos.permission.INSTALL_BUNDLE
...@@ -119,7 +119,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -119,7 +119,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| 17700017 | Failed to install the HAP since the version of the HAP to install is too early. | | 17700017 | Failed to install the HAP since the version of the HAP to install is too early. |
| 17700018 | Failed to install because the dependent module does not exist. | | 17700018 | Failed to install because the dependent module does not exist. |
| 17700031 | Failed to install the HAP because the overlay check of the HAP is failed. | | 17700031 | Failed to install the HAP because the overlay check of the HAP is failed. |
| 17700036 | Failed to install because without allow app shared bundle permission. | | 17700036 | Failed to install the HSP because lacks appropriate permissions. |
| 17700039 | Failed to install because disallow install a shared bundle by hapFilePaths. |
| 17700041 | Failed to install because enterprise device management disallow install. |
**Example** **Example**
...@@ -149,13 +151,84 @@ try { ...@@ -149,13 +151,84 @@ try {
} }
``` ```
## BundleInstaller.install
install(hapFilePaths: Array\<string\>, installParam?: InstallParam) : Promise\<void\>;
Installs a bundle. This API uses a promise to return the result.
**System API**: This is a system API.
**Required permissions**: ohos.permission.INSTALL_BUNDLE
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**Parameters**
| Name | Type | Mandatory| Description |
| ------------ | ----------------------------- | ---- | ------------------------------------------------------------ |
| hapFilePaths | Array\<string\> | Yes | Paths where the HAP files of the bundle are stored, which are the data directories. If only one directory is passed, the HAP files in the directory must belong to the same bundle and have the same signature.|
| installParam | [InstallParam](#installparam) | No | Parameters required for the installation. |
**Return value**
| Type | Description |
| --------------- | -------------------------------------- |
| Promise\<void\> | Promise that returns no value.|
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
| ID| Error Message |
| -------- | ------------------------------------------------------------ |
| 17700004 | The specified user ID is not found. |
| 17700010 | Failed to install the HAP because the HAP fails to be parsed. |
| 17700011 | Failed to install the HAP because the HAP signature fails to be verified. |
| 17700012 | Failed to install the HAP because the HAP path is invalid or the HAP is too large. |
| 17700015 | Failed to install the HAPs because they have different configuration information. |
| 17700016 | Failed to install the HAP because of insufficient system disk space. |
| 17700017 | Failed to install the HAP since the version of the HAP to install is too early. |
| 17700018 | Failed to install because the dependent module does not exist. |
| 17700031 | Failed to install the HAP because the overlay check of the HAP is failed. |
| 17700036 | Failed to install the HSP because lacks appropriate permissions. |
| 17700039 | Failed to install because disallow install a shared bundle by hapFilePaths. |
| 17700041 | Failed to install because enterprise device management disallow install. |
**Example**
```ts
import installer from '@ohos.bundle.installer';
let hapFilePaths = ['/data/storage/el2/base/haps/entry/files/'];
let installParam = {
userId: 100,
isKeepData: false,
installFlag: 1,
};
try {
installer.getBundleInstaller().then(data => {
data.install(hapFilePaths, installParam)
.then((data) => {
console.info('install success: ' + JSON.stringify(data));
}).catch((error) => {
console.error('install failed:' + err.message);
});
}).catch(error => {
console.error('getBundleInstaller failed. Cause: ' + error.message);
});
} catch (error) {
console.error('getBundleInstaller failed. Cause: ' + error.message);
}
```
## BundleInstaller.uninstall ## BundleInstaller.uninstall
uninstall(bundleName: string, installParam: InstallParam, callback: AsyncCallback&lt;void&gt;): void; uninstall(bundleName: string, installParam: InstallParam, callback: AsyncCallback&lt;void&gt;): void;
Uninstalls a bundle. This API uses an asynchronous callback to return the result. Uninstalls a bundle. This API uses an asynchronous callback to return the result.
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Required permissions**: ohos.permission.INSTALL_BUNDLE **Required permissions**: ohos.permission.INSTALL_BUNDLE
...@@ -177,6 +250,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -177,6 +250,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| -------- | ------------------------------------------------------------ | | -------- | ------------------------------------------------------------ |
| 17700004 | The specified user ID is not found. | | 17700004 | The specified user ID is not found. |
| 17700020 | The specified bundle is pre-installed bundle which cannot be uninstalled. | | 17700020 | The specified bundle is pre-installed bundle which cannot be uninstalled. |
| 17700040 | The specified bundle is a shared bundle which cannot be uninstalled. |
**Example** **Example**
...@@ -212,7 +286,7 @@ uninstall(uninstallParam: UninstallParam, callback : AsyncCallback\<void>) : voi ...@@ -212,7 +286,7 @@ uninstall(uninstallParam: UninstallParam, callback : AsyncCallback\<void>) : voi
Uninstalls a shared bundle. This API uses an asynchronous callback to return the result. Uninstalls a shared bundle. This API uses an asynchronous callback to return the result.
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Required permissions**: ohos.permission.INSTALL_BUNDLE **Required permissions**: ohos.permission.INSTALL_BUNDLE
...@@ -266,7 +340,7 @@ uninstall(uninstallParam: UninstallParam) : Promise\<void>; ...@@ -266,7 +340,7 @@ uninstall(uninstallParam: UninstallParam) : Promise\<void>;
Uninstalls a shared bundle. This API uses a promise to return the result. Uninstalls a shared bundle. This API uses a promise to return the result.
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Required permissions**: ohos.permission.INSTALL_BUNDLE **Required permissions**: ohos.permission.INSTALL_BUNDLE
...@@ -325,7 +399,7 @@ recover(bundleName: string, installParam: InstallParam, callback: AsyncCallback& ...@@ -325,7 +399,7 @@ recover(bundleName: string, installParam: InstallParam, callback: AsyncCallback&
Recovers a bundle. This API uses an asynchronous callback to return the result. Recovers a bundle. This API uses an asynchronous callback to return the result.
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Required permissions**: ohos.permission.INSTALL_BUNDLE **Required permissions**: ohos.permission.INSTALL_BUNDLE
...@@ -381,7 +455,7 @@ Defines the hash parameters for bundle installation and uninstall. ...@@ -381,7 +455,7 @@ Defines the hash parameters for bundle installation and uninstall.
**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 | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---------- | ------ | ---------------- | ---------------- | | ---------- | ------ | ---------------- | ---------------- |
...@@ -394,15 +468,15 @@ Defines the parameters that need to be specified for bundle installation, uninst ...@@ -394,15 +468,15 @@ Defines the parameters that need to be specified for bundle installation, uninst
**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 | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------------------------------ | ------------------------------ | ------------------ | ------------------ | | ------------------------------ | ------------------------------ | ------------------ | ------------------ |
| userId | number | Yes | User ID. You can use [queryOsAccountLocalIdFromProcess](js-apis-osAccount.md#getOsAccountLocalId) to obtain the user of the current process.| | userId | number | No | User ID. You can use [queryOsAccountLocalIdFromProcess](js-apis-osAccount.md#getOsAccountLocalId) to obtain the user of the current process.|
| installFlag | number | Yes | Installation flag. The value **0** means initial installation and **1** means overwrite installation.| | installFlag | number | No | Installation flag. The value **0** means initial installation and **1** means overwrite installation.|
| isKeepData | boolean | Yes | Whether to retain the data directory during bundle uninstall.| | isKeepData | boolean | No | Whether to retain the data directory during bundle uninstall.|
| hashParams | Array<[HashParam](#hashparam)> | Yes| Hash parameters. | | hashParams | Array<[HashParam](#hashparam)> | No| Hash parameters. |
| crowdtestDeadline| number | Yes |End date of crowdtesting.| | crowdtestDeadline| number | No |End date of crowdtesting.|
| sharedBundleDirPaths | Array\<String> | No|Paths of the shared bundle files.| | sharedBundleDirPaths | Array\<String> | No|Paths of the shared bundle files.|
## UninstallParam<sup>10+</sup> ## UninstallParam<sup>10+</sup>
...@@ -411,7 +485,7 @@ Defines the parameters required for the uninstallation of a shared bundle. ...@@ -411,7 +485,7 @@ Defines the parameters required for the uninstallation of a shared bundle.
**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 | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ----------- | ------ | ---- | ------------------------------------------------------------ | | ----------- | ------ | ---- | ------------------------------------------------------------ |
......
...@@ -5,8 +5,6 @@ The **overlay** module provides APIs for installing a [module with the overlay f ...@@ -5,8 +5,6 @@ The **overlay** module provides APIs for installing a [module with the overlay f
> **NOTE** > **NOTE**
> >
> The initial APIs of this module are supported since API version 10. 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 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
> The APIs provided by this module are system APIs.
## Modules to Import ## Modules to Import
...@@ -41,8 +39,8 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -41,8 +39,8 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message | | ID| Error Message |
| ------ | -------------------------------------- | | ------ | -------------------------------------- |
| 17700002 | The specified moduleName is not existed. | | 17700002 | The specified module name is not found. |
| 17700033 | The specified moduleName is not overlay module. | | 17700033 | The specified module is not an overlay module. |
**Example** **Example**
...@@ -84,8 +82,8 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -84,8 +82,8 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message | | ID| Error Message |
| ------ | -------------------------------------- | | ------ | -------------------------------------- |
| 17700002 | The specified moduleName is not existed. | | 17700002 | The specified module name is not found. |
| 17700033 | The specified moduleName is not overlay module. | | 17700033 | The specified module is not an overlay module. |
**Example** **Example**
...@@ -116,7 +114,7 @@ Enables or disables a module with the overlay feature in another application. Th ...@@ -116,7 +114,7 @@ Enables or disables a module with the overlay feature in another application. Th
**System capability**: SystemCapability.BundleManager.BundleFramework.Overlay **System capability**: SystemCapability.BundleManager.BundleFramework.Overlay
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -138,10 +136,10 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -138,10 +136,10 @@ 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 moduleName is not existed. | | 17700002 | The specified module name is not found. |
| 17700032 | The specified bundleName does not contain any overlay module. | | 17700032 | The specified bundle does not contain any overlay module. |
| 17700033 | The specified moduleName is not overlay module. | | 17700033 | The specified module is not an overlay module. |
**Example** **Example**
...@@ -172,7 +170,7 @@ Enables or disables a module with the overlay feature in another application. Th ...@@ -172,7 +170,7 @@ Enables or disables a module with the overlay feature in another application. Th
**System capability**: SystemCapability.BundleManager.BundleFramework.Overlay **System capability**: SystemCapability.BundleManager.BundleFramework.Overlay
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -181,7 +179,7 @@ Enables or disables a module with the overlay feature in another application. Th ...@@ -181,7 +179,7 @@ Enables or disables a module with the overlay feature in another application. Th
| bundleName | string | Yes | Bundle name of the application. | | bundleName | string | Yes | Bundle name of the application. |
| moduleName | string | Yes | HAP name of the module with the overlay feature. | | moduleName | string | Yes | HAP name of the module with the overlay feature. |
| isEnabled | boolean | Yes | Whether to enable the module with the overlay feature. The value **true** means to enable the module, and **false** means to disable the module.| | isEnabled | boolean | Yes | Whether to enable the module with the overlay feature. The value **true** means to enable the module, and **false** means to disable the module.|
| callback | AsyncCallback\<Want> | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined** and **data** is the processing result obtained; otherwise, **err** is an error object. | | callback | AsyncCallback\<void> | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined** and data is the processing result obtained; otherwise, **err** is an error object. |
**Error codes** **Error codes**
...@@ -189,10 +187,10 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -189,10 +187,10 @@ 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 moduleName is not existed. | | 17700002 | The specified module name is not found. |
| 17700032 | The specified bundleName does not contain any overlay module. | | 17700032 | The specified bundle does not contain any overlay module. |
| 17700033 | The specified moduleName is not overlay module. | | 17700033 | The specified module is not an overlay module. |
**Example** **Example**
...@@ -240,8 +238,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -240,8 +238,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message | | ID| Error Message |
| ------ | -------------------------------------- | | ------ | -------------------------------------- |
| 17700002 | The specified moduleName is not existed. | | 17700002 | The specified module name is not found. |
| 17700033 | The specified moduleName is not overlay module. | | 17700032 | he specified bundle does not contain any overlay module. |
| 17700033 | The specified module is not an overlay module. |
**Example** **Example**
...@@ -271,7 +270,7 @@ Obtains the information about a module with the overlay feature in the current a ...@@ -271,7 +270,7 @@ Obtains the information about a module with the overlay feature in the current a
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ------ | ---- | --------------------------------------- | | ----------- | ------ | ---- | --------------------------------------- |
| moduleName | string | Yes | HAP name of the module with the overlay feature. | | moduleName | string | Yes | HAP name of the module with the overlay feature. |
| callback | AsyncCallback\<OverlayModuleInfo> | Yes | Callback used to return the result, which is an **OverlayModuleInfo** object. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. | | callback | AsyncCallback\<OverlayModuleInfo> | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes** **Error codes**
...@@ -279,8 +278,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -279,8 +278,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message | | ID| Error Message |
| ------ | -------------------------------------- | | ------ | -------------------------------------- |
| 17700002 | The specified moduleName is not existed. | | 17700002 | The specified module name is not found. |
| 17700033 | The specified moduleName is not overlay module. | | 17700032 | he specified bundle does not contain any overlay module. |
| 17700033 | The specified module is not an overlay module. |
**Example** **Example**
...@@ -325,8 +325,8 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -325,8 +325,8 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message | | ID| Error Message |
| ------ | -------------------------------------- | | ------ | -------------------------------------- |
| 17700002 | The specified moduleName is not existed. | | 17700002 | The specified module name is not found. |
| 17700034 | The specified moduleName is overlay module. | | 17700034 | The specified module is an overlay module. |
**Example** **Example**
...@@ -356,7 +356,7 @@ Obtains the information about modules with the overlay feature in the current ap ...@@ -356,7 +356,7 @@ Obtains the information about modules with the overlay feature in the current ap
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ------ | ---- | --------------------------------------- | | ----------- | ------ | ---- | --------------------------------------- |
| targetModuleName | string | Yes | HAP name of the target module specified by modules with the overlay feature. | | targetModuleName | string | Yes | HAP name of the target module specified by modules with the overlay feature. |
| callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result, which is an array of **OverlayModuleInfo** objects. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. | | callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes** **Error codes**
...@@ -364,8 +364,8 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -364,8 +364,8 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message | | ID| Error Message |
| ------ | -------------------------------------- | | ------ | -------------------------------------- |
| 17700002 | The specified moduleName is not existed. | | 17700002 | The specified module name is not found. |
| 17700034 | The specified moduleName is overlay module. | | 17700034 | The specified module is an overlay module. |
**Example** **Example**
...@@ -394,7 +394,7 @@ Obtains the information about a module with the overlay feature in another appli ...@@ -394,7 +394,7 @@ Obtains the information about a module with the overlay feature in another appli
**System capability**: SystemCapability.BundleManager.BundleFramework.Overlay **System capability**: SystemCapability.BundleManager.BundleFramework.Overlay
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -416,9 +416,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -416,9 +416,9 @@ 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 moduleName is not existed. | | 17700002 | The specified module name is not found. |
| 17700032 | The specified bundleName does not contain any overlay module. | | 17700032 | The specified bundle does not contain any overlay module. |
| 17700033 | The specified moduleName is not overlay module. | | 17700033 | The specified module is not an overlay module. |
**Example** **Example**
...@@ -446,7 +446,7 @@ Obtains the information about a module with the overlay feature in another appli ...@@ -446,7 +446,7 @@ Obtains the information about a module with the overlay feature in another appli
**System capability**: SystemCapability.BundleManager.BundleFramework.Overlay **System capability**: SystemCapability.BundleManager.BundleFramework.Overlay
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -454,7 +454,7 @@ Obtains the information about a module with the overlay feature in another appli ...@@ -454,7 +454,7 @@ Obtains the information about a module with the overlay feature in another appli
| ----------- | ------ | ---- | --------------------------------------- | | ----------- | ------ | ---- | --------------------------------------- |
| bundleName | string | Yes | Bundle name of the application. | | bundleName | string | Yes | Bundle name of the application. |
| moduleName | string | Yes | HAP name of the module with the overlay feature. If this parameter is not specified, the API obtains the information of all modules with the overlay feature in that application. | | moduleName | string | Yes | HAP name of the module with the overlay feature. If this parameter is not specified, the API obtains the information of all modules with the overlay feature in that application. |
| callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result, which is an array of **OverlayModuleInfo** objects. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. | | callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes** **Error codes**
...@@ -463,9 +463,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -463,9 +463,9 @@ 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 moduleName is not existed. | | 17700002 | The specified module name is not found. |
| 17700032 | The specified bundleName does not contain any overlay module. | | 17700032 | The specified bundle does not contain any overlay module. |
| 17700033 | The specified moduleName is not overlay module. | | 17700033 | The specified module is not an overlay module. |
**Example** **Example**
...@@ -496,14 +496,14 @@ Obtains the information about all modules with the overlay feature in another ap ...@@ -496,14 +496,14 @@ Obtains the information about all modules with the overlay feature in another ap
**System capability**: SystemCapability.BundleManager.BundleFramework.Overlay **System capability**: SystemCapability.BundleManager.BundleFramework.Overlay
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ------ | ---- | --------------------------------------- | | ----------- | ------ | ---- | --------------------------------------- |
| bundleName | string | Yes | Bundle name of the application. | | bundleName | string | Yes | Bundle name of the application. |
| callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result, which is an array of **OverlayModuleInfo** objects. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. | | callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes** **Error codes**
...@@ -512,9 +512,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -512,9 +512,9 @@ 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 moduleName is not existed. | | 17700002 | The specified module name is not found. |
| 17700032 | The specified bundleName does not contain any overlay module. | | 17700032 | The specified bundle does not contain any overlay module. |
| 17700033 | The specified moduleName is not overlay module. | | 17700033 | The specified module is not an overlay module. |
**Example** **Example**
...@@ -544,7 +544,7 @@ Obtains the information about modules with the overlay feature in another applic ...@@ -544,7 +544,7 @@ Obtains the information about modules with the overlay feature in another applic
**System capability**: SystemCapability.BundleManager.BundleFramework.Overlay **System capability**: SystemCapability.BundleManager.BundleFramework.Overlay
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
...@@ -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 result, which is an array of **OverlayModuleInfo** objects.| | Promise\<Array\<OverlayModuleInfo>> | Promise used to return the array of overlay module information obtained.|
**Error codes** **Error codes**
...@@ -566,9 +566,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -566,9 +566,9 @@ 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 moduleName is not existed. | | 17700002 | The specified module name is not found. |
| 17700034 | The specified moduleName is overlay module. | | 17700034 | The specified module is an overlay module. |
| 17700035 | The specified bundleName is overlay bundle. | | 17700035 | The specified bundle is an overlay bundle. |
**Example** **Example**
...@@ -596,15 +596,15 @@ Obtains the information about modules with the overlay feature in another applic ...@@ -596,15 +596,15 @@ Obtains the information about modules with the overlay feature in another applic
**System capability**: SystemCapability.BundleManager.BundleFramework.Overlay **System capability**: SystemCapability.BundleManager.BundleFramework.Overlay
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ------ | ---- | --------------------------------------- | | ----------- | ------ | ---- | --------------------------------------- |
| targetBundleName | string | Yes | Bundle name of the application. | | targetBundleName | string | Yes | Bundle name of the application. |
| moduleName | string | No | HAP name of the target module, which is **targetModuleName** specified by modules with the overlay feature. If this parameter is not specified, the API obtains the information associated with all modules in that application. | | moduleName | string | Yes | HAP name of the target module, which is **targetModuleName** specified by modules with the overlay feature. If this parameter is not specified, the API obtains the information associated with all modules in that application. |
| callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result, which is an array of **OverlayModuleInfo** objects. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. | | callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes** **Error codes**
...@@ -613,9 +613,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -613,9 +613,9 @@ 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 moduleName is not existed. | | 17700002 | The specified module name is not found. |
| 17700034 | The specified moduleName is overlay module. | | 17700034 | The specified module is an overlay module. |
| 17700035 | The specified bundleName is overlay bundle. | | 17700035 | The specified bundle is an overlay bundle. |
**Example** **Example**
...@@ -646,14 +646,14 @@ Obtains the information about all modules with the overlay feature in another ap ...@@ -646,14 +646,14 @@ Obtains the information about all modules with the overlay feature in another ap
**System capability**: SystemCapability.BundleManager.BundleFramework.Overlay **System capability**: SystemCapability.BundleManager.BundleFramework.Overlay
**System API**: This is a system API and cannot be called by third-party applications. **System API**: This is a system API.
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ------ | ---- | --------------------------------------- | | ----------- | ------ | ---- | --------------------------------------- |
| targetBundleName | string | Yes | Bundle name of the application. | | targetBundleName | string | Yes | Bundle name of the application. |
| callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result, which is an array of **OverlayModuleInfo** objects. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. | | callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes** **Error codes**
...@@ -662,9 +662,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -662,9 +662,9 @@ 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 moduleName is not existed. | | 17700002 | The specified module name is not found. |
| 17700034 | The specified moduleName is overlay module. | | 17700034 | The specified module is an overlay module. |
| 17700035 | The specified bundleName is overlay bundle. | | 17700035 | The specified bundle is an overlay bundle. |
**Example** **Example**
......
...@@ -13,7 +13,7 @@ The **TaskPool** APIs return error codes in numeric format. For details about th ...@@ -13,7 +13,7 @@ The **TaskPool** APIs return error codes in numeric format. For details about th
## Modules to Import ## Modules to Import
```js ```ts
import taskpool from '@ohos.taskpool'; import taskpool from '@ohos.taskpool';
``` ```
...@@ -58,9 +58,9 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -58,9 +58,9 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
**Example** **Example**
```js ```ts
@Concurrent
function func(args) { function func(args) {
"use concurrent"
console.log("func: " + args); console.log("func: " + args);
return args; return args;
} }
...@@ -110,9 +110,9 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -110,9 +110,9 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
**Example** **Example**
```js ```ts
@Concurrent
function func(args) { function func(args) {
"use concurrent"
console.log("func: " + args); console.log("func: " + args);
return args; return args;
} }
...@@ -158,9 +158,9 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -158,9 +158,9 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
**Example** **Example**
```js ```ts
@Concurrent
function func(args) { function func(args) {
"use concurrent"
console.log("func: " + args); console.log("func: " + args);
return args; return args;
} }
...@@ -199,9 +199,9 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -199,9 +199,9 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
**Example** **Example**
```js ```ts
@Concurrent
function func(args) { function func(args) {
"use concurrent"
console.log("func: " + args); console.log("func: " + args);
return args; return args;
} }
...@@ -209,7 +209,11 @@ function func(args) { ...@@ -209,7 +209,11 @@ function func(args) {
async function taskpoolTest() { async function taskpoolTest() {
let task = new taskpool.Task(func, 100); let task = new taskpool.Task(func, 100);
let value = await taskpool.execute(task); let value = await taskpool.execute(task);
taskpool.cancel(task); try {
taskpool.cancel(task);
} catch (e) {
console.log("taskpool.cancel occur error:" + e);
}
} }
taskpoolTest(); taskpoolTest();
...@@ -221,12 +225,19 @@ taskpoolTest(); ...@@ -221,12 +225,19 @@ taskpoolTest();
The following sequenceable data types are supported: All Primitive Type (excluding symbol), Date, String, RegExp, Array, Map, Set, Object, ArrayBuffer, and TypedArray. The following sequenceable data types are supported: All Primitive Type (excluding symbol), Date, String, RegExp, Array, Map, Set, Object, ArrayBuffer, and TypedArray.
### Precautions ### Precautions
A task in the task pool can reference only variables passed in by input parameters or imported variables. It does not support closure variables. - The task pool APIs can be used only in the module with **compileMode** set to **esmodule** in the stage model. To check the **compileMode** setting of a module, open the **build-profile.json5** file of the module and check for **"compileMode": "esmodule"** under **buildOption**.
- A task in the task pool can reference only variables passed in by input parameters or imported variables, rather than closure variables. The decorator **@Concurrent** is used to intercept unsupported variables.
- A task in the task pool supports only common functions or async functions, rather than class member functions or anonymous functions. The decorator **@Concurrent** is used to intercept unsupported functions.
- The decorator **@Concurrent** can be used only in the .ets file. To create a task in the task pool in the .ts file, use the statement **use concurrent**.
```js ### Using the Task Pool in Simple Mode
// 1. Reference a variable passed in by the input parameter.
**Example 1**
```ts
// Common functions are supported, and variables passed in by input parameters are also supported.
@Concurrent
function func(args) { function func(args) {
"use concurrent"
console.log("func: " + args); console.log("func: " + args);
return args; return args;
} }
...@@ -245,17 +256,19 @@ async function taskpoolTest() { ...@@ -245,17 +256,19 @@ async function taskpoolTest() {
taskpoolTest(); taskpoolTest();
``` ```
```js **Example 2**
// 2. Reference an imported variable.
// b.ts ```ts
// b.ets
export var c = 2000; export var c = 2000;
```
```ts
// Reference an imported variable.
// a.ets (in the same directory as b.ets)
import { c } from "./b";
// a.ts (in the same directory as b.ts) @Concurrent
import { c } from './b'
function test(a) { function test(a) {
"use concurrent"
console.log(a); console.log(a);
console.log(c); console.log(c);
return a; return a;
...@@ -274,3 +287,63 @@ async function taskpoolTest() { ...@@ -274,3 +287,63 @@ async function taskpoolTest() {
taskpoolTest(); taskpoolTest();
``` ```
**Example 3**
```ts
// The async functions are supported.
@Concurrent
async function task() {
let ret = await Promise.all([
new Promise(resolve => setTimeout(resolve, 1000, "resolved"))
]);
return ret;
}
async function taskpoolTest() {
taskpool.execute(task).then((result) => {
console.log("TaskPoolTest task result: " + result);
});
}
taskpoolTest();
```
**Example 4**
```ts
// Use use concurrent to create a task in the task pool in the .ts file.
// c.ts
function test1(n) {
"use concurrent"
return n;
}
export async function taskpoolTest1() {
console.log("taskpoolTest1 start");
var task = new taskpool.Task(test1, 100);
var result = await taskpool.execute(task);
console.log("taskpoolTest1 result:" + result);
}
async function test2() {
"use concurrent"
var ret = await Promise.all([
new Promise(resolve => setTimeout(resolve, 1000, "resolved"))
]);
return ret;
}
export async function taskpoolTest2() {
console.log("taskpoolTest2 start");
taskpool.execute(test2).then((result) => {
console.log("TaskPoolTest2 result: " + result);
});
}
```
```ts
/ / a.ets (in the same directory as c.ts)
import { taskpoolTest1, taskpoolTest2 } from "./c";
taskpoolTest1();
taskpoolTest2();
```
# UI Appearance
The **uiAppearance** module provides basic capabilities for managing the system appearance. It allows for color mode configuration currently, and will introduce more features over time.
> **NOTE**
>
> The APIs of this module are supported since API version 9. Updates will be marked with a superscript to indicate their earliest API version.
>
> The APIs provided by this module are system APIs.
## Modules to Import
```ts
import uiAppearance from '@ohos.uiAppearance'
```
## DarkMode
Enumerates the color modes.
**System capability**: SystemCapability.ArkUI.UiAppearance
| Name| Value| Description|
| -- | -- | -- |
| ALWAYS_DARK | 0 | The system is always in dark mode. |
| ALWAYS_LIGHT | 1 | The system is always in light mode.|
## uiAppearance.setDarkMode
setDarkMode(mode: DarkMode, callback: AsyncCallback\<void>): void
Sets the system color mode. This API uses an asynchronous callback to return the result.
**Permission required**: ohos.permission.UPDATE_CONFIGURATION
**System capability**: SystemCapability.ArkUI.UiAppearance
**Parameters**
| Name| Type| Mandatory| Description|
| -- | -- | -- | -- |
| mode | [DarkMode](#darkmode) | Yes| Color mode to set.|
| callback | AsyncCallback\<void>| Yes| Callback used to return the result.|
**Example**
```ts
uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK, (err) => {
console.info(`${err}`);
})
```
## uiAppearance.setDarkMode
setDarkMode(mode: DarkMode): Promise\<void>;
Sets the system color mode. This API uses a promise to return the result.
**Permission required**: ohos.permission.UPDATE_CONFIGURATION
**System capability**: SystemCapability.ArkUI.UiAppearance
**Parameters**
| Name| Type| Mandatory| Description|
| -- | -- | -- | -- |
| mode | [DarkMode](#darkmode) | Yes| Color mode to set.|
**Return value**
| Type | Description |
| ------ | ------------------------------ |
| Promise\<void> | Promise that returns no value.|
**Example**
```ts
uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => {
console.log('Set dark-mode successfully.');
}).catch((err) => {
console.log(`Set dark-mode failed, ${err}`);
});
```
## uiAppearance.getDarkMode
getDarkMode(): DarkMode;
Obtains the system color mode.
**Permission required**: ohos.permission.UPDATE_CONFIGURATION
**System capability**: SystemCapability.ArkUI.UiAppearance
**Return value**
| Type| Description|
| -- | -- |
|[DarkMode](#darkmode) | Color mode obtained.|
**Example**
```ts
let darkMode = uiAppearance.getDarkMode();
console.log(`Get dark-mode ${darkMode}`);
```
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
- [DataShare Error Codes](errorcode-datashare.md) - [DataShare Error Codes](errorcode-datashare.md)
- [Distributed Data Object Error Codes](errorcode-distributed-dataObject.md) - [Distributed Data Object Error Codes](errorcode-distributed-dataObject.md)
- [Distributed KV Store Error Codes](errorcode-distributedKVStore.md) - [Distributed KV Store Error Codes](errorcode-distributedKVStore.md)
- [Preferences Error Codes](errorcode-preferences.md) - [User Preference Error Codes](errorcode-preferences.md)
- File Management - File Management
- [File Management Error Codes](errorcode-filemanagement.md) - [File Management Error Codes](errorcode-filemanagement.md)
- Telephony Service - Telephony Service
......
# Event Error Codes # Event Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 1500001 Want Action Is Null ## 1500001 Want Action Is Null
**Error Message** **Error Message**
......
# DeviceUsageStatistics Error Codes # DeviceUsageStatistics Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 10000001 Memory Operation Failure ## 10000001 Memory Operation Failure
**Error Message** **Error Message**
......
# DistributedNotificationService Error Codes # DistributedNotificationService Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 1600001 Internal Error ## 1600001 Internal Error
**Error Message** **Error Message**
......
# Distributed Scheduler Error Codes # Distributed Scheduler Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 16600001 The system ability works abnormally. ## 16600001 The system ability works abnormally.
**Error Message** **Error Message**
......
# Ability Error Codes # Ability Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 16000001 Ability Name Does Not Exist ## 16000001 Ability Name Does Not Exist
**Error Message** **Error Message**
...@@ -182,6 +186,24 @@ The context passed in the API does not exist. ...@@ -182,6 +186,24 @@ The context passed in the API does not exist.
Use the correct context. Use the correct context.
## 16000017 Waiting for the Previous Abilities to Finish Startup
**Error Message**
The previous ability is starting, wait start later.
**Description**
Too many abilities need to be started. Due to the limited processing capability of the system, the requests are cached in the queue and processed in sequence.
**Possible Causes**
The system has a large number of concurrent requests.
**Solution**
No action is required. Wait for the previous abilities to finish startup.
## 100001 Internal Error ## 100001 Internal Error
**Error Message** **Error Message**
......
# Application Access Control Error Codes # Application Access Control Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 12100001 Invalid Parameters ## 12100001 Invalid Parameters
**Error Message** **Error Message**
......
# Accessibility Error Codes # Accessibility Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 9300001 Invalid Bundle Name or Ability Name ## 9300001 Invalid Bundle Name or Ability Name
**Error Message** **Error Message**
......
# Account Management Error Codes # Account Management Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
The following includes the error codes for OS accounts, distributed accounts, and app accounts. The following includes the error codes for OS accounts, distributed accounts, and app accounts.
## 12300001 System Service Abnormal ## 12300001 System Service Abnormal
......
# Animator Error Codes # Animator Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 100001 Internal Error ## 100001 Internal Error
**Error Message** **Error Message**
......
# Audio Error Codes # Audio Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 6800101 Invalid Parameter ## 6800101 Invalid Parameter
**Error Message** **Error Message**
......
# AVSession Management Error Codes # AVSession Management Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 6600101 Session Service Exception ## 6600101 Session Service Exception
**Error Message** **Error Message**
......
# backgroundTaskManager Error Codes # backgroundTaskManager Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 9800001 Memory Operation Failure ## 9800001 Memory Operation Failure
**Error Message** **Error Message**
......
# Power Consumption Statistics Error Codes # Power Consumption Statistics Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 4600101 Service Connection Failure ## 4600101 Service Connection Failure
**Error Message** **Error Message**
......
# Brightness Error Codes # Brightness Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 4700101 Service Connection Failure ## 4700101 Service Connection Failure
**Error Message** **Error Message**
......
# Bundle Error Codes # Bundle Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 17700001 Bundle Name Does Not Exist ## 17700001 Bundle Name Does Not Exist
...@@ -506,7 +510,7 @@ Check whether the application contains a module with the overlay feature. ...@@ -506,7 +510,7 @@ Check whether the application contains a module with the overlay feature.
**Error Message** **Error Message**
The specified module is not overlay module. The specified module is not an overlay module.
**Description** **Description**
...@@ -524,7 +528,7 @@ Check whether the module is configured with the overlay feature. ...@@ -524,7 +528,7 @@ Check whether the module is configured with the overlay feature.
**Error Message** **Error Message**
The specified module is overlay module. The specified module is an overlay module.
**Description** **Description**
...@@ -542,7 +546,7 @@ Check whether the specified module is configured with the overlay feature. ...@@ -542,7 +546,7 @@ Check whether the specified module is configured with the overlay feature.
**Error Message** **Error Message**
The specified bundle is overlay bundle. The specified bundle is an overlay bundle.
**Description** **Description**
...@@ -560,7 +564,7 @@ Check whether the application contains only modules with the overlay feature. ...@@ -560,7 +564,7 @@ Check whether the application contains only modules with the overlay feature.
**Error Message** **Error Message**
Failed to install because without allow app shared bundle permission. Failed to install the HSP because lacks appropriate permissions.
**Description** **Description**
...@@ -609,3 +613,39 @@ The shared library to uninstall does not exist. ...@@ -609,3 +613,39 @@ The shared library to uninstall does not exist.
**Solution** **Solution**
1. Check whether the shared library exists. 1. Check whether the shared library exists.
2. Check whether the version of the shared library is the same as that installed. 2. Check whether the version of the shared library is the same as that installed.
## 17700039 Failure in Installing an Inter-Application Shared Library
**Error Message**
Failed to install because disallow install a shared bundle by hapFilePaths.
**Description**
During application installation, the installation package passed in is of the inter-application shared library type.
**Possible Causes**
1. When the Bundle Manager tool is used to install an application, the **-p** parameter is set to the installation package path of an inter-application shared library.
2. When the **install** API is called to install an application, the **hapFilePaths** parameter is set to the installation package path of an inter-application shared library.
**Solution**
1. Use the **-s** parameter to specify the installation package path of an inter-application shared library.
2. Use the **sharedBundleDirPaths** parameter in **installParam** to specify the installation package path of an inter-application shared library.
## 17700040 Failure in Uninstalling an Inter-Application Shared Library
**Error Message**
The specified bundle is a shared bundle which cannot be uninstalled.
**Description**
During application uninstall, the bundle name of an inter-application shared library is passed in.
**Possible Causes**
1. When the Bundle Manager tool is used to uninstall an application, the **-n** parameter is set to the bundle name of an inter-application shared library.
2. When the **install** API is called to uninstall an application, the **bundleName** parameter is set to the bundle name of an inter-application shared library.
**Solution**
1. Use the **-s** parameter to specify the application to be uninstalled as a shared library application.
2. Use the **bundleName** and **versionCode** parameters in **UninstallParam** to specify the bundle name and version of the shared library to be uninstalled.
# Certificate Error Codes # Certificate Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 19020001 Memory Error ## 19020001 Memory Error
**Error Message** **Error Message**
......
# colorSpaceManager Error Codes # colorSpaceManager Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 18600001 Abnormal Parameter Value ## 18600001 Abnormal Parameter Value
**Error Message** **Error Message**
......
# Crypto Framework Error Codes # Crypto Framework Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 17620001 Memory Error ## 17620001 Memory Error
**Error Message** **Error Message**
......
# RDB Error Codes # RDB Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 14800010 Invalid RDB Name ## 14800010 Invalid RDB Name
**Error Message** **Error Message**
......
# DataShare Error Codes # DataShare Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 15700010 Failed to Create a DataShareHelper ## 15700010 Failed to Create a DataShareHelper
**Error Message** **Error Message**
......
# Device Management Error Codes # Device Management Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 11600101 Service Invoking Exception ## 11600101 Service Invoking Exception
**Error Message** **Error Message**
......
# Display Error Codes # Display Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 1400001 Invalid Display or Screen ## 1400001 Invalid Display or Screen
**Error Message** **Error Message**
......
# Distributed Data Object Error Codes # Distributed Data Object Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 15400001 Failed to Create the In-Memory Database ## 15400001 Failed to Create the In-Memory Database
**Error Message** **Error Message**
......
# Distributed KV Store Error Codes # Distributed KV Store Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 15100001 Subscription Count Reaches the Limit ## 15100001 Subscription Count Reaches the Limit
**Error Message** **Error Message**
......
# Enterprise Device Management Error Codes # Enterprise Device Management Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 9200001 Application Not a Device Administrator ## 9200001 Application Not a Device Administrator
**Error Message** **Error Message**
......
# FaultLogger Error Codes # FaultLogger Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 10600001 Service Faulty or Not Started ## 10600001 Service Faulty or Not Started
**Error Message** **Error Message**
......
# File Management Error Codes # File Management Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
The error codes of the file management subsystem consist of the following:<br>- Basic file I/O error codes<br>- User data management error codes<br>- User file access error codes<br>- Spatial statistics error codes The error codes of the file management subsystem consist of the following:<br>- Basic file I/O error codes<br>- User data management error codes<br>- User file access error codes<br>- Spatial statistics error codes
## Basic File I/O Error Codes ## Basic File I/O Error Codes
...@@ -6,121 +11,153 @@ The error codes of the file management subsystem consist of the following:<br>- ...@@ -6,121 +11,153 @@ The error codes of the file management subsystem consist of the following:<br>-
### 13900001 Operation Not Permitted ### 13900001 Operation Not Permitted
**Error Message** **Error Message**
Operation not permitted Operation not permitted
**Possible Causes** **Possible Causes**
The current operation on the file is not allowed. The current operation on the file is not allowed.
**Solution** **Solution**
Check the permission for the file. Check the permission for the file.
### 13900002 File or Directory Not Exist ### 13900002 File or Directory Not Exist
**Error Message** **Error Message**
No such file or directory No such file or directory
**Possible Causes** **Possible Causes**
The file or directory does not exist. The file or directory does not exist.
**Solution** **Solution**
Check whether the file directory exists. Check whether the file directory exists.
### 13900003 Process Not Exist ### 13900003 Process Not Exist
**Error Message** **Error Message**
No such process No such process
**Possible Causes** **Possible Causes**
The process does not exist. The process does not exist.
**Solution** **Solution**
1. Check whether the process is killed unexpectedly. 1. Check whether the process is killed unexpectedly.
2. Check whether the service related to the process has started. 2. Check whether the service related to the process has started.
### 13900004 System Call Interrupted ### 13900004 System Call Interrupted
**Error Message** **Error Message**
Interrupted system call Interrupted system call
**Possible Causes** **Possible Causes**
The system call is interrupted by another thread. The system call is interrupted by another thread.
**Solution** **Solution**
1. Check the multi-thread code logic. 1. Check the multi-thread code logic.
2. Invoke the system call again. 2. Invoke the system call again.
### 13900005 I/O Error ### 13900005 I/O Error
**Error Message** **Error Message**
I/O error I/O error
**Possible Causes** **Possible Causes**
The I/O request is invalid. The I/O request is invalid.
**Solution** **Solution**
Initiate the I/O request again. Initiate the I/O request again.
### 13900006 Device or Address Not Exist ### 13900006 Device or Address Not Exist
**Error Message** **Error Message**
No such device or address No such device or address
**Possible Causes** **Possible Causes**
The device information or address is incorrect. The device information or address is incorrect.
**Solution** **Solution**
Check that the device information or address is correct. Check that the device information or address is correct.
### 13900007 Long Parameter List ### 13900007 Long Parameter List
**Error Message** **Error Message**
Arg list too long Arg list too long
**Possible Causes** **Possible Causes**
The parameter list is too long. The parameter list is too long.
**Solution** **Solution**
Reduce the number of parameters. Reduce the number of parameters.
### 13900008 Invalid File Descriptor ### 13900008 Invalid File Descriptor
**Error Message** **Error Message**
Bad file descriptor Bad file descriptor
**Possible Causes** **Possible Causes**
This file descriptor is closed. This file descriptor is closed.
**Solution** **Solution**
Check whether the file descriptor is closed. Check whether the file descriptor is closed.
### 13900009 Child Process Not Exist ### 13900009 Child Process Not Exist
**Error Message** **Error Message**
No child processes No child processes
**Possible Causes** **Possible Causes**
The child process cannot be created. The child process cannot be created.
**Solution** **Solution**
Check the maximum number of processes in the system. Check the maximum number of processes in the system.
### 13900010 Resource Unavailable ### 13900010 Resource Unavailable
**Error Message** **Error Message**
Try again Try again
**Possible Causes** **Possible Causes**
The resources are blocked. The resources are blocked.
**Solution** **Solution**
Request resources. Request resources.
### 13900011 Memory Overflow ### 13900011 Memory Overflow
**Error Message** **Error Message**
Out of memory Out of memory
**Possible Causes** **Possible Causes**
A memory overflow occurs. A memory overflow occurs.
**Solution** **Solution**
...@@ -130,9 +167,13 @@ A memory overflow occurs. ...@@ -130,9 +167,13 @@ A memory overflow occurs.
### 13900012 Permission Denied ### 13900012 Permission Denied
**Error Message** **Error Message**
Permission denied Permission denied
**Possible Causes** **Possible Causes**
1. You do not have the permission to operate the file. 1. You do not have the permission to operate the file.
2. The file sandbox path is incorrect. 2. The file sandbox path is incorrect.
...@@ -143,329 +184,418 @@ Permission denied ...@@ -143,329 +184,418 @@ Permission denied
### 13900013 Incorrect Address ### 13900013 Incorrect Address
**Error Message** **Error Message**
Bad address Bad address
**Possible Causes** **Possible Causes**
The address is incorrect. The address is incorrect.
**Solution** **Solution**
Check that the address is correct. Check that the address is correct.
### 13900014 Device or Resource Not Available ### 13900014 Device or Resource Not Available
**Error Message** **Error Message**
Device or resource busy Device or resource busy
**Possible Causes** **Possible Causes**
The requested resource is unavailable. The requested resource is unavailable.
**Solution** **Solution**
Request the resource again. Request the resource again.
### 13900015 File Already Exists ### 13900015 File Already Exists
**Error Message** **Error Message**
File exists File exists
**Possible Causes** **Possible Causes**
The file to be created already exists. The file to be created already exists.
**Solution** **Solution**
Check whether the file path is correct. Check whether the file path is correct.
### 13900016 Invalid Cross-Device Link ### 13900016 Invalid Cross-Device Link
**Error Message** **Error Message**
Cross-device link Cross-device link
**Possible Causes** **Possible Causes**
The link between devices is incorrect. The link between devices is incorrect.
**Solution** **Solution**
Check the devices and create the link correctly. Check the devices and create the link correctly.
### 13900017 Device Not Exist ### 13900017 Device Not Exist
**Error Message** **Error Message**
No such device No such device
**Possible Causes** **Possible Causes**
The device is not identified. The device is not identified.
**Solution** **Solution**
Check the connection to the target device. Check the connection to the target device.
### 13900018 Invalid Directory ### 13900018 Invalid Directory
**Error Message** **Error Message**
Not a directory Not a directory
**Possible Causes** **Possible Causes**
The specified directory is invalid. The specified directory is invalid.
**Solution** **Solution**
Check that the directory is correct. Check that the directory is correct.
### 13900019 The Specified Object Is a Directory ### 13900019 The Specified Object Is a Directory
**Error Message** **Error Message**
Is a directory Is a directory
**Possible Causes** **Possible Causes**
The specified object is a directory. The specified object is a directory.
**Solution** **Solution**
Check that the specified data is correct. Check that the specified data is correct.
### 13900020 Invalid Parameter ### 13900020 Invalid Parameter
**Error Message** **Error Message**
Invalid argument Invalid argument
**Possible Causes** **Possible Causes**
Invalid input parameter is detected. Invalid input parameter is detected.
**Solution** **Solution**
Check that the input parameters are valid. Check that the input parameters are valid.
### 13900021 Too Many File Descriptors Opened ### 13900021 Too Many File Descriptors Opened
**Error Message** **Error Message**
File table overflow File table overflow
**Possible Causes** **Possible Causes**
The number of file descriptors opened has reached the limit. The number of file descriptors opened has reached the limit.
**Solution** **Solution**
Close the file descriptors that are no longer required. Close the file descriptors that are no longer required.
### 13900022 Too Many Files Opened ### 13900022 Too Many Files Opened
**Error Message** **Error Message**
Too many open files Too many open files
**Possible Causes** **Possible Causes**
The number of files opened has reached the limit. The number of files opened has reached the limit.
**Solution** **Solution**
Close the files that are not required. Close the files that are not required.
### 13900023 Text File Not Respond ### 13900023 Text File Not Respond
**Error Message** **Error Message**
Text file busy Text file busy
**Possible Causes** **Possible Causes**
The executable file of the program is in use. The executable file of the program is in use.
**Solution** **Solution**
Close the program that is being debugged. Close the program that is being debugged.
### 13900024 File Oversized ### 13900024 File Oversized
**Error Message** **Error Message**
File too large File too large
**Possible Causes** **Possible Causes**
The file size exceeds the limit. The file size exceeds the limit.
**Solution** **Solution**
Check whether the file size exceeds the limit. Check whether the file size exceeds the limit.
### 13900025 Insufficient Space on the Device ### 13900025 Insufficient Space on the Device
**Error Message** **Error Message**
No space left on device No space left on device
**Possible Causes** **Possible Causes**
The device storage space is insufficient. The device storage space is insufficient.
**Solution** **Solution**
Clear the space of the device. Clear the space of the device.
### 13900026 Invalid Shift ### 13900026 Invalid Shift
**Error Message** **Error Message**
Illegal seek Illegal seek
**Possible Causes** **Possible Causes**
Seek is used in pipe or FIFO. Seek is used in pipe or FIFO.
**Solution** **Solution**
Check the use of seek. Check the use of seek.
### 13900027 Read-Only File System ### 13900027 Read-Only File System
**Error Message** **Error Message**
Read-only file system Read-only file system
**Possible Causes** **Possible Causes**
The file system allows read operations only. The file system allows read operations only.
**Solution** **Solution**
Check whether the file is read-only. Check whether the file is read-only.
### 13900028 Links Reach the Limit ### 13900028 Links Reach the Limit
**Error Message** **Error Message**
Too many links Too many links
**Possible Causes** **Possible Causes**
The number of links to the file has reached the limit. The number of links to the file has reached the limit.
**Solution** **Solution**
Delete the links that are no longer required. Delete the links that are no longer required.
### 13900029 Resource Deadlock ### 13900029 Resource Deadlock
**Error Message** **Error Message**
Resource deadlock would occur Resource deadlock would occur
**Possible Causes** **Possible Causes**
Resource deadlock occurs. Resource deadlock occurs.
**Solution** **Solution**
Terminate the deadlock process. Terminate the deadlock process.
### 13900030 Long File Name ### 13900030 Long File Name
**Error Message** **Error Message**
Filename too Long Filename too Long
**Possible Causes** **Possible Causes**
The length of the path or file name exceeds the limit. The length of the path or file name exceeds the limit.
**Solution** **Solution**
Modify the path or file name. Modify the path or file name.
### 13900031 Function Not Implemented ### 13900031 Function Not Implemented
**Error Message** **Error Message**
Function not implemented Function not implemented
**Possible Causes** **Possible Causes**
The function is not supported by the system. The function is not supported by the system.
**Solution** **Solution**
Check the system version and update the system if required. Check the system version and update the system if required.
### 13900032 Directory Not Empty ### 13900032 Directory Not Empty
**Error Message** **Error Message**
Directory not empty Directory not empty
**Possible Causes** **Possible Causes**
The specified directory is not empty. The specified directory is not empty.
**Solution** **Solution**
1. Check the directory. 1. Check the directory.
2. Ensure that the directory is empty. 2. Ensure that the directory is empty.
### 13900033 Too Many Symbol Links ### 13900033 Too Many Symbol Links
**Error Message** **Error Message**
Too many symbolic links Too many symbolic links
**Possible Causes** **Possible Causes**
There are too many symbolic links. There are too many symbolic links.
**Solution** **Solution**
Delete unnecessary symbol links. Delete unnecessary symbol links.
### 13900034 Operation Blocked ### 13900034 Operation Blocked
**Error Message** **Error Message**
Operation would block Operation would block
**Possible Causes** **Possible Causes**
The operation is blocked. The operation is blocked.
**Solution** **Solution**
Perform the operation again. Perform the operation again.
### 13900035 Invalid File Descriptor ### 13900035 Invalid File Descriptor
**Error Message** **Error Message**
Invalid request desecriptor
Invalid request descriptor
**Possible Causes** **Possible Causes**
The requested file descriptor is invalid. The requested file descriptor is invalid.
**Solution** **Solution**
Check that the file descriptor is valid. Check that the file descriptor is valid.
### 13900036 Target Is Not a Character Stream Device ### 13900036 Target Is Not a Character Stream Device
**Error Message** **Error Message**
Device not a stream Device not a stream
**Possible Causes** **Possible Causes**
The device pointed to by the file descriptor is not a character stream device. The device pointed to by the file descriptor is not a character stream device.
**Solution** **Solution**
Check whether the file descriptor points to a stream device. Check whether the file descriptor points to a stream device.
### 13900037 No Data Available ### 13900037 No Data Available
**Error Message** **Error Message**
No data available No data available
**Possible Causes** **Possible Causes**
The required data is not available. The required data is not available.
**Solution** **Solution**
Request the data again. Request the data again.
### 13900038 Value Mismatches the Data Type ### 13900038 Value Mismatches the Data Type
**Error Message** **Error Message**
Value too large for defined data type Value too large for defined data type
**Possible Causes** **Possible Causes**
The specified value is out of the range defined for the data type. The specified value is out of the range defined for the data type.
**Solution** **Solution**
Modify the data type. Modify the data type.
### 13900039 File Descriptor Corrupted ### 13900039 File Descriptor Corrupted
**Error Message** **Error Message**
File descriptor in bad state File descriptor in bad state
**Possible Causes** **Possible Causes**
The file descriptor is corrupted. The file descriptor is corrupted.
**Solution** **Solution**
Check that the file descriptor is valid. Check that the file descriptor is valid.
### 13900040 System Call Interrupted ### 13900040 System Call Interrupted
**Error Message** **Error Message**
Interrupted systen call should be restarted
Interrupted system call should be restarted
**Possible Causes** **Possible Causes**
The system call is interrupted. The system call is interrupted.
**Solution** **Solution**
Invoke the system call again. Invoke the system call again.
### 13900041 Disk Quota Exceeded ### 13900041 Disk Quota Exceeded
**Error Message** **Error Message**
Quota exceeded Quota exceeded
**Possible Causes** **Possible Causes**
The disk space is insufficient. The disk space is insufficient.
**Solution** **Solution**
Clear disk space. Clear disk space.
### 13900042 Unknown Error ### 13900042 Unknown Error
**Error Message** **Error Message**
Unknown error Unknown error
**Possible Causes** **Possible Causes**
The error is unidentified. The error is unidentified.
**Solution** **Solution**
...@@ -477,45 +607,57 @@ The error is unidentified. ...@@ -477,45 +607,57 @@ The error is unidentified.
### 14000001 Invalid File Name ### 14000001 Invalid File Name
**Error Message** **Error Message**
Invalid display name Invalid display name
**Possible Causes** **Possible Causes**
The file name contains invalid characters. The file name contains invalid characters.
**Solution** **Solution**
Modify the file name. Modify the file name.
### 14000002 Invalid URI ### 14000002 Invalid URI
**Error Message** **Error Message**
Invalid uri Invalid uri
**Possible Causes** **Possible Causes**
The URI is invalid. The URI is invalid.
**Solution** **Solution**
Use the obtained URI. Use the obtained URI.
### 14000003 Invalid File Name Extension ### 14000003 Invalid File Name Extension
**Error Message** **Error Message**
Invalid file extension Invalid file extension
**Possible Causes** **Possible Causes**
The file name extension is incorrect. The file name extension is incorrect.
**Solution** **Solution**
Modify the file name extension. Modify the file name extension.
### 14000004 File in Recycle Bin ### 14000004 File in Recycle Bin
**Error Message** **Error Message**
File has been put into trash bin File has been put into trash bin
**Possible Causes** **Possible Causes**
The file is moved to the Recycle Bin. The file is moved to the Recycle Bin.
**Solution** **Solution**
Check whether the file is in the Recycle Bin. Check whether the file is in the Recycle Bin.
## Spatial Statistics Error Codes ## Spatial Statistics Error Codes
...@@ -523,83 +665,105 @@ Check whether the file is in the Recycle Bin. ...@@ -523,83 +665,105 @@ Check whether the file is in the Recycle Bin.
### 13600001 IPC Failed ### 13600001 IPC Failed
**Error Message** **Error Message**
IPC error IPC error
**Possible Causes** **Possible Causes**
The called service does not exist. The called service does not exist.
**Solution** **Solution**
Check whether the service is started. Check whether the service is started.
### 13600002 File System Not Supported ### 13600002 File System Not Supported
**Error Message** **Error Message**
Not supported filesystem
Not supported file system
**Possible Causes** **Possible Causes**
The file system is not supported. The file system is not supported.
**Solution** **Solution**
Use a supported file system. Use a supported file system.
### 13600003 Mount Failed ### 13600003 Mount Failed
**Error Message** **Error Message**
Failed to mount Failed to mount
**Possible Causes** **Possible Causes**
The **mount** command fails. The **mount** command fails.
**Solution** **Solution**
Remove the card and run the **mount** command again. Remove the card and run the **mount** command again.
### 13600004 Unmount Failed ### 13600004 Unmount Failed
**Error Message** **Error Message**
Failed to unmount Failed to unmount
**Possible Causes** **Possible Causes**
The device does not respond. The device does not respond.
**Solution** **Solution**
Check whether the file is being used. If yes, kill the thread that uses the file. Check whether the file is being used. If yes, kill the thread that uses the file.
### 13600005 Incorrect Volume State ### 13600005 Incorrect Volume State
**Error Message** **Error Message**
Incorrect volume state Incorrect volume state
**Possible Causes** **Possible Causes**
The volume state is incorrect. The volume state is incorrect.
**Solution** **Solution**
Check whether the current volume state is correct. Check whether the current volume state is correct.
### 13600006 Failed to Create a Directory or Node ### 13600006 Failed to Create a Directory or Node
**Error Message** **Error Message**
Prepare directory or node error Prepare directory or node error
**Possible Causes** **Possible Causes**
The directory or node to be created already exists. The directory or node to be created already exists.
**Solution** **Solution**
Check whether the directory or node to be created already exists. Check whether the directory or node to be created already exists.
### 13600007 Failed to Delete a Directory or Node ### 13600007 Failed to Delete a Directory or Node
**Error Message** **Error Message**
Delete directory or node error Delete directory or node error
**Possible Causes** **Possible Causes**
The specified directory or node has been deleted. The specified directory or node has been deleted.
**Solution** **Solution**
Check whether the specified directory or node exists. Check whether the specified directory or node exists.
### 13600008 Object Not Exist ### 13600008 Object Not Exist
**Error Message** **Error Message**
No such object No such object
**Possible Causes** **Possible Causes**
...@@ -613,12 +777,15 @@ No such object ...@@ -613,12 +777,15 @@ No such object
### 13600009 Invalid User ID ### 13600009 Invalid User ID
**Error Message** **Error Message**
User id out of range User id out of range
**Possible Causes** **Possible Causes**
The specified user ID is incorrect. The specified user ID is incorrect.
**Solution** **Solution**
Check that the user ID is correct. Check that the user ID is correct.
## User File Access Error Codes ## User File Access Error Codes
...@@ -626,51 +793,64 @@ Check that the user ID is correct. ...@@ -626,51 +793,64 @@ Check that the user ID is correct.
### 14300001 IPC Failed ### 14300001 IPC Failed
**Error Message** **Error Message**
IPC error IPC error
**Possible Causes** **Possible Causes**
1. The server service does not exist. 1. The server service does not exist.
2. The extension mechanism is abnormal. 2. The extension mechanism is abnormal.
**Solution** **Solution**
Check that the server service exists. Check that the server service exists.
### 14300002 Incorrect URI Format ### 14300002 Incorrect URI Format
**Error Message** **Error Message**
Invalid uri Invalid uri
**Possible Causes** **Possible Causes**
The URI is invalid. The URI is invalid.
**Solution** **Solution**
Check that the URI is in correct format. Check that the URI is in correct format.
### 14300003 Failed to Obtain the Server Ability Information ### 14300003 Failed to Obtain the Server Ability Information
**Error Message** **Error Message**
Fail to get fileextension info Fail to get fileextension info
**Possible Causes** **Possible Causes**
The BMS interface is abnormal. The BMS interface is abnormal.
**Solution** **Solution**
Check for basic system capability errors. Check for basic system capability errors.
### 14300004 Incorrect Result Returned by js-server ### 14300004 Incorrect Result Returned by js-server
**Error Message** **Error Message**
Get wrong result Get wrong result
**Possible Causes** **Possible Causes**
The data returned by the server is incorrect. The data returned by the server is incorrect.
**Solution** **Solution**
Check the data returned by the server. Check the data returned by the server.
### 14300005 Failed to Register Notify ### 14300005 Failed to Register Notify
**Error Message** **Error Message**
Fail to register notification Fail to register notification
**Possible Causes** **Possible Causes**
...@@ -678,11 +858,13 @@ Fail to register notification ...@@ -678,11 +858,13 @@ Fail to register notification
2. The extension mechanism is abnormal. 2. The extension mechanism is abnormal.
**Solution** **Solution**
Check that the server service exists. Check that the server service exists.
### 14300006 Failed to Unregister Notify ### 14300006 Failed to Unregister Notify
**Error Message** **Error Message**
Fail to remove notification Fail to remove notification
**Possible Causes** **Possible Causes**
...@@ -690,22 +872,27 @@ Fail to remove notification ...@@ -690,22 +872,27 @@ Fail to remove notification
2. The extension mechanism is abnormal. 2. The extension mechanism is abnormal.
**Solution** **Solution**
Check that the server service exists. Check that the server service exists.
### 14300007 Failed to Initialize the Notify Agent ### 14300007 Failed to Initialize the Notify Agent
**Error Message** **Error Message**
Fail to init notification agent Fail to init notification agent
**Possible Causes** **Possible Causes**
The specified Notify agent has not been registered. The specified Notify agent has not been registered.
**Solution** **Solution**
Check whether the specified Notify agent is registered. Check whether the specified Notify agent is registered.
### 14300008 Failed to Notify the Agent ### 14300008 Failed to Notify the Agent
**Error Message** **Error Message**
Fail to notify agent Fail to notify agent
**Possible Causes** **Possible Causes**
...@@ -713,6 +900,7 @@ Fail to notify agent ...@@ -713,6 +900,7 @@ Fail to notify agent
2. The extension mechanism is abnormal. 2. The extension mechanism is abnormal.
**Solution** **Solution**
Check whether the client is normal. Check whether the client is normal.
## Error Code Adaptation ## Error Code Adaptation
......
# Form Error Codes # Form Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 16500001 Internal Error ## 16500001 Internal Error
**Error Message** **Error Message**
......
# Location Subsystem Error Codes # Location Subsystem Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 3301000 Location Service Unavailable ## 3301000 Location Service Unavailable
**Error Message** **Error Message**
......
# Application Event Logging Error Codes # Application Event Logging Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 11100001 Application Event Logging Disabled ## 11100001 Application Event Logging Disabled
**Error Message** **Error Message**
......
# HiSysEvent Error Codes # HiSysEvent Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 1120001 Invalid Event Domain ## 1120001 Invalid Event Domain
**Error Message** **Error Message**
......
# HiDebug Error Codes # HiDebug Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 11400101 Failed to Obtain the System Service ## 11400101 Failed to Obtain the System Service
......
# HUKS Error Codes # HUKS Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 12000001 Feature Not Supported ## 12000001 Feature Not Supported
**Error Message** **Error Message**
......
# i18n Error Codes # i18n Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 890001 Incorrect Parameter Type ## 890001 Incorrect Parameter Type
**Error Message** **Error Message**
......
# Input Method Framework Error Codes # Input Method Framework Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 12800001 Package Manager Error ## 12800001 Package Manager Error
**Error Message** **Error Message**
......
# Media Error Codes # Media Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 5400101 Memory Allocation Failed ## 5400101 Memory Allocation Failed
**Error Message** **Error Message**
......
# Screen Hopping Error Codes # Screen Hopping Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 4400001 Incorrect Target Device Descriptor ## 4400001 Incorrect Target Device Descriptor
**Error Message** **Error Message**
......
# Network Connection Management Error Codes # Network Connection Management Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 2100001 Invalid Parameter Value ## 2100001 Invalid Parameter Value
**Error Message** **Error Message**
......
# Ethernet Connection Error Codes # Ethernet Connection Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 2200001 Invalid Parameter Value ## 2200001 Invalid Parameter Value
**Error Message** **Error Message**
......
# HTTP Error Codes # HTTP Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 2300001 Protocol Not Supported ## 2300001 Protocol Not Supported
**Error Message** **Error Message**
......
# Policy Management Error Codes # Policy Management Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 2100001 Invalid Parameter Value ## 2100001 Invalid Parameter Value
**Error Message** **Error Message**
......
# Network Sharing Error Codes # Network Sharing Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 2200001 Invalid Parameter Value ## 2200001 Invalid Parameter Value
**Error Message** **Error Message**
......
# NFC Error Codes # NFC Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 3100101 ## 3100101
**Error Message** **Error Message**
......
# Notification Error Codes # Notification Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 1600001 Internal Error ## 1600001 Internal Error
**Error Message** **Error Message**
......
# Pasteboard Error Codes # Pasteboard Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 12900001 Index Out of Range ## 12900001 Index Out of Range
**Error Message** **Error Message**
......
# Power Manager Error Codes # Power Manager Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 4900101 Service Connection Failure ## 4900101 Service Connection Failure
**Error Message** **Error Message**
......
# Preferences Error Codes # User Preference Error Codes
## 15500010 Failed to Delete Preferences > **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 15500010 Failed to Delete the User Preference Persistence File
**Error Message** **Error Message**
Failed to delete preferences. Failed to delete preferences.
**Description** **Description**
Failed to delete the preference. The operation of deleting the user preference persistence file failed.
**Possible Causes** **Possible Causes**
......
# promptAction Error Codes # promptAction Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 100001 Internal Error ## 100001 Internal Error
**Error Message** **Error Message**
......
# reminderAgentManager Error Codes # reminderAgentManager Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 1700001 Notification Disabled ## 1700001 Notification Disabled
**Error Message** **Error Message**
......
# Upload and Download Error Codes # Upload and Download Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 13400001 File Operation Error ## 13400001 File Operation Error
**Error Message** **Error Message**
......
# Resource Manager Error Codes # Resource Manager Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 9001001 Invalid Resource ID ## 9001001 Invalid Resource ID
**Error Message** **Error Message**
......
# Router Error Codes # Router Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 100001 Internal Error ## 100001 Internal Error
**Error Message** **Error Message**
......
# RPC Error Codes # RPC Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
The APIs of the **rpc** module return exceptions since API version 9. The APIs of the **rpc** module return exceptions since API version 9.
## 1900001 Failed to Call mmap ## 1900001 Failed to Call mmap
......
# Running Lock Error Codes # Running Lock Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 4900101 Service Connection Failure ## 4900101 Service Connection Failure
**Error Message** **Error Message**
......
# Screen Lock Management Error Codes # Screen Lock Management Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 13200002 Screen Lock Management Service Is Abnormal ## 13200002 Screen Lock Management Service Is Abnormal
**Error Message** **Error Message**
......
# Sensor Error Codes # Sensor Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 14500101 Service Exception ## 14500101 Service Exception
**Error Message** **Error Message**
......
# System Parameter Error Codes # System Parameter Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 14700101 Failure to Query the System Parameter ## 14700101 Failure to Query the System Parameter
**Error Message** **Error Message**
......
# Telephony Error Codes # Telephony Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 8300001 Input Parameter Value Out of Range ## 8300001 Input Parameter Value Out of Range
**Error Message** **Error Message**
......
# Thermal Manager Error Codes # Thermal Manager Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 4800101 Service Connection Failure ## 4800101 Service Connection Failure
**Error Message** **Error Message**
......
# Time and Time Zone Service Error Codes # Time and Time Zone Service Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## -1 Screen Unlock Error ## -1 Screen Unlock Error
**Error Message** **Error Message**
......
# UiTest Error Codes # UiTest Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 17000001 Initialization Failure ## 17000001 Initialization Failure
**Error Message** **Error Message**
......
# Update Error Codes # Update Error Codes
> **NOTE**
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
## 11500104 IPC Error ## 11500104 IPC Error
**Error Message** **Error Message**
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册