diff --git a/en/application-dev/reference/apis/js-apis-app-ability-errorManager.md b/en/application-dev/reference/apis/js-apis-app-ability-errorManager.md index 3cb86447fa75d12370004a0393521cc0f53aa755..38787f9c3a0697fb30965dba3aae6fc4c3da41d6 100644 --- a/en/application-dev/reference/apis/js-apis-app-ability-errorManager.md +++ b/en/application-dev/reference/apis/js-apis-app-ability-errorManager.md @@ -26,6 +26,14 @@ Registers an error observer. | type | string | Yes| Type of the API to call.| | observer | [ErrorObserver](./js-apis-inner-application-errorObserver.md) | Yes| Digital code of the observer.| +**Error codes** + +| ID| Error Message| +| ------- | -------- | +| 16000003 | Id does not exist. | + +For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md). + **Example** ```js @@ -57,6 +65,14 @@ Deregisters an error observer. This API uses an asynchronous callback to return | observerId | number | Yes| Digital code of the observer.| | callback | AsyncCallback\ | Yes| Callback used to return the result.| +**Error codes** + +| ID| Error Message| +| ------- | -------- | +| 16000003 | Id does not exist. | + +For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md). + **Example** ```js @@ -95,6 +111,14 @@ Deregisters an error observer. This API uses a promise to return the result. | -------- | -------- | | Promise\ | Promise used to return the result.| +**Error codes** + +| ID| Error Message| +| ------- | -------- | +| 16000003 | Id does not exist. | + +For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md). + **Example** ```js diff --git a/en/application-dev/reference/apis/js-apis-app-ability-serviceExtensionAbility.md b/en/application-dev/reference/apis/js-apis-app-ability-serviceExtensionAbility.md index a2cb64620ffe61ca7acf18efe847ec51c59d6c49..64a79d03257b9bb1f97e40bfbe3d83f7cf68bac5 100644 --- a/en/application-dev/reference/apis/js-apis-app-ability-serviceExtensionAbility.md +++ b/en/application-dev/reference/apis/js-apis-app-ability-serviceExtensionAbility.md @@ -250,4 +250,3 @@ Dumps the client information. } } ``` - diff --git a/en/application-dev/reference/apis/js-apis-app-ability-uiAbility.md b/en/application-dev/reference/apis/js-apis-app-ability-uiAbility.md index 2c0fa34611d102078e71cc83e25c3a45ac1a1beb..3a22adffb69524caac823df4d37379133ee346ad 100644 --- a/en/application-dev/reference/apis/js-apis-app-ability-uiAbility.md +++ b/en/application-dev/reference/apis/js-apis-app-ability-uiAbility.md @@ -331,7 +331,10 @@ Sends parcelable data to the target ability. | ID| Error Message| | ------- | -------------------------------- | -| 401 | If the input parameter is not valid parameter. | +| 16200001 | Caller released. The caller has been released. | +| 16200002 | Callee invalid. The callee does not exist. | +| 16000050 | Internal Error. | + For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md). **Example** @@ -411,7 +414,10 @@ Sends parcelable data to the target ability and obtains the parcelable data retu | ID| Error Message| | ------- | -------------------------------- | -| 401 | If the input parameter is not valid parameter. | +| 16200001 | Caller released. The caller has been released. | +| 16200002 | Callee invalid. The callee does not exist. | +| 16000050 | Internal Error. | + For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md). **Example** @@ -480,10 +486,10 @@ Releases the caller interface of the target ability. | ID| Error Message| | ------- | -------------------------------- | -| 401 | Invalid input parameter. | | 16200001 | Caller released. The caller has been released. | | 16200002 | Callee invalid. The callee does not exist. | -| 16000050 | Internal Error. | + +For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md). **Example** @@ -519,6 +525,14 @@ Registers a callback that is invoked when the stub on the target ability is disc **System capability**: SystemCapability.Ability.AbilityRuntime.AbilityCore +**Error codes** + +| ID| Error Message| +| ------- | -------------------------------- | +| 16200001 | Caller released. The caller has been released. | + +For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md). + **Parameters** | Name| Type| Mandatory| Description| @@ -572,7 +586,8 @@ Registers a callback that is invoked when the stub on the target ability is disc | ID| Error Message| | ------- | -------------------------------- | -| 401 | If the input parameter is not valid parameter. | +| 16200001 | Caller released. The caller has been released. | + For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md). **Example** @@ -729,7 +744,9 @@ Registers a caller notification callback, which is invoked when the target abili | ID| Error Message| | ------- | -------------------------------- | -| 401 | If the input parameter is not valid parameter. | +| 16200004 | Method registered. The method has registered. | +| 16000050 | Internal error. | + For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md). **Example** @@ -794,7 +811,9 @@ Deregisters a caller notification callback, which is invoked when the target abi | ID| Error Message| | ------- | -------------------------------- | -| 401 | If the input parameter is not valid parameter. | +| 16200005 | Method not registered. The method has not registered. | +| 16000050 | Internal error. | + For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md). diff --git a/en/application-dev/reference/apis/js-apis-avsession.md b/en/application-dev/reference/apis/js-apis-avsession.md index b1744ca450a4f22d7903a5defafb3fcac483fc10..81cca94567467b3779e1bf3702929c9285ecdbf0 100644 --- a/en/application-dev/reference/apis/js-apis-avsession.md +++ b/en/application-dev/reference/apis/js-apis-avsession.md @@ -354,8 +354,9 @@ For details about the error codes, see [AVSession Management Error Codes](../err import audio from '@ohos.multimedia.audio'; let audioManager = audio.getAudioManager(); +let audioRoutingManager = audioManager.getRoutingManager(); let audioDevices; -await audioManager.getDevices(audio.DeviceFlag.OUTPUT_DEVICES_FLAG).then((data) => { +await audioRoutingManager.getDevices(audio.DeviceFlag.OUTPUT_DEVICES_FLAG).then((data) => { audioDevices = data; console.info('Promise returned to indicate that the device list is obtained.'); }).catch((err) => { @@ -407,8 +408,9 @@ For details about the error codes, see [AVSession Management Error Codes](../err import audio from '@ohos.multimedia.audio'; let audioManager = audio.getAudioManager(); +let audioRoutingManager = audioManager.getRoutingManager(); let audioDevices; -await audioManager.getDevices(audio.DeviceFlag.OUTPUT_DEVICES_FLAG).then((data) => { +await audioRoutingManager.getDevices(audio.DeviceFlag.OUTPUT_DEVICES_FLAG).then((data) => { audioDevices = data; console.info('Promise returned to indicate that the device list is obtained.'); }).catch((err) => { @@ -2402,7 +2404,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err **Example** ```js -import wantAgent from '@ohos.app.ability.wantAgent'; +import wantAgent from '@ohos.wantAgent'; controller.getLaunchAbility(function (err, agent) { if (err) { diff --git a/en/application-dev/reference/apis/js-apis-inner-application-applicationContext.md b/en/application-dev/reference/apis/js-apis-inner-application-applicationContext.md index 22a07b41fa5a3ca98b55678350dceb7e92970fa7..b6f0a5480bca245663acb0ef2239c5ba790391e7 100644 --- a/en/application-dev/reference/apis/js-apis-inner-application-applicationContext.md +++ b/en/application-dev/reference/apis/js-apis-inner-application-applicationContext.md @@ -283,6 +283,15 @@ Obtains information about the running processes. This API uses a promise to retu | -------- | -------- | | Promise\> | Promise used to return the API call result and the process running information. You can perform error handling or custom processing in this callback.| +**Error codes** + +| ID| Error Message| +| ------- | -------- | +| 16000011 | The context does not exist. | +| 16000050 | Internal error. | + +For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md). + **Example** ```ts @@ -312,6 +321,15 @@ Obtains information about the running processes. This API uses an asynchronous c | -------- | -------- | |AsyncCallback\> | Callback used to return the API call result and the process running information. You can perform error handling or custom processing in this callback.| +**Error codes** + +| ID| Error Message| +| ------- | -------- | +| 16000011 | The context does not exist. | +| 16000050 | Internal error. | + +For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md). + **Example** ```ts @@ -339,6 +357,14 @@ Kills all the processes where the application is located. This API uses a promis | -------- | -------- | | Promise\> | Promise used to return the result.| +**Error codes** + +| ID| Error Message| +| ------- | -------- | +| 16000011 | The context does not exist. | + +For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md). + **Example** ```ts @@ -364,6 +390,14 @@ Kills all the processes where the application is located. This API uses an async | -------- | -------- | |AsyncCallback\ | Callback used to return the result.| +**Error codes** + +| ID| Error Message| +| ------- | -------- | +| 16000011 | The context does not exist. | + +For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md). + **Example** ```ts