diff --git a/en/application-dev/reference/apis/js-apis-commonEventManager.md b/en/application-dev/reference/apis/js-apis-commonEventManager.md index ded3d353d53f58e3dd59b3818029839da90cfcaa..225bd59b0ae8e7fa2b33b50efaa875bdb82705be 100644 --- a/en/application-dev/reference/apis/js-apis-commonEventManager.md +++ b/en/application-dev/reference/apis/js-apis-commonEventManager.md @@ -36,12 +36,13 @@ Publishes a common event. This API uses an asynchronous callback to return the r **Error codes** For details about the error codes, see [Event Error Codes](../errorcodes/errorcode-CommonEventService.md). -|ID |Error Message | -|-----------|--------------------| -|1500004 |not System services or System app| -|1500007 |message send error| -|1500008 |CEMS error| -|1500009 |system error| +| ID| Error Message | +| -------- | ----------------------------------- | +| 401 | The parameter check failed. | +| 1500004 | not System services. | +| 1500007 | error sending message to Common Event Service. | +| 1500008 | Common Event Service does not complete initialization. | +| 1500009 | error obtaining system parameters. | **Example** @@ -80,17 +81,16 @@ Publishes a common event with given attributes. This API uses an asynchronous ca | callback | syncCallback\ | Yes | Callback used to return the result. | **Error codes** -|ID |Error Message | -|-----------|--------------------| -|1500004 |not System services or System app| -|1500007 |message send error| -|1500008 |CEMS error| -|1500009 |system error| - +| ID| Error Message | +| -------- | ----------------------------------- | +| 401 | The parameter check failed. | +| 1500004 | not System services. | +| 1500007 | error sending message to Common Event Service. | +| 1500008 | Common Event Service does not complete initialization. | +| 1500009 | error obtaining system parameters. | **Example** - ```ts // Attributes of a common event. var options = { @@ -137,12 +137,14 @@ Publishes a common event to a specific user. This API uses an asynchronous callb | callback | AsyncCallback\ | Yes | Callback used to return the result. | **Error codes** -|ID |Error Message | -|-----------|--------------------| -|1500004 |not System services or System app| -|1500007 |message send error| -|1500008 |CEMS error| -|1500009 |system error| +| ID| Error Message | +| -------- | ----------------------------------- | +| 202 | not system app. | +| 401 | The parameter check failed. | +| 1500004 | not System services. | +| 1500007 | error sending message to Common Event Service. | +| 1500008 | Common Event Service does not complete initialization. | +| 1500009 | error obtaining system parameters. | **Example** @@ -189,16 +191,17 @@ Publishes a common event with given attributes to a specific user. This API uses | callback | AsyncCallback\ | Yes | Callback used to return the result. | **Error codes** -|ID |Error Message | -|-----------|--------------------| -|1500004 |not System services or System app| -|1500007 |message send error| -|1500008 |CEMS error| -|1500009 |system error| +| ID| Error Message | +| -------- | ----------------------------------- | +| 202 | not system app. | +| 401 | The parameter check failed. | +| 1500004 | not System services. | +| 1500007 | error sending message to Common Event Service. | +| 1500008 | Common Event Service does not complete initialization. | +| 1500009 | error obtaining system parameters. | **Example** - ```ts // Attributes of a common event. var options = { @@ -243,6 +246,14 @@ Creates a subscriber. This API uses an asynchronous callback to return the resul | subscribeInfo | [CommonEventSubscribeInfo](./js-apis-inner-commonEvent-commonEventSubscribeInfo.md) | Yes | Subscriber information. | | callback | AsyncCallback\<[CommonEventSubscriber](./js-apis-inner-commonEvent-commonEventSubscriber.md)> | Yes | Callback used to return the result.| +**Error codes** + + For details about the error codes, see [Event Error Codes](../errorcodes/errorcode-CommonEventService.md). + +| ID| Error Message | +| -------- | ----------------------------------- | +| 401 | The parameter check failed. | + **Example** @@ -293,6 +304,14 @@ Creates a subscriber. This API uses a promise to return the result. | --------------------------------------------------------- | ---------------- | | Promise\<[CommonEventSubscriber](./js-apis-inner-commonEvent-commonEventSubscriber.md)> | Promise used to return the subscriber object.| +**Error codes** + + For details about the error codes, see [Event Error Codes](../errorcodes/errorcode-CommonEventService.md). + +| ID| Error Message | +| -------- | ----------------------------------- | +| 401 | The parameter check failed. | + **Example** ```ts @@ -334,6 +353,17 @@ Subscribes to common events. This API uses an asynchronous callback to return th | subscriber | [CommonEventSubscriber](./js-apis-inner-commonEvent-commonEventSubscriber.md) | Yes | Subscriber object. | | callback | AsyncCallback\<[CommonEventData](./js-apis-inner-commonEvent-commonEventData.md)> | Yes | Callback used to return the result.| +**Error codes** + + For details about the error codes, see [Event Error Codes](../errorcodes/errorcode-CommonEventService.md). + +| ID| Error Message | +| -------- | ----------------------------------- | +| 401 | The parameter check failed. | +| 801 | capability not supported. | +| 1500007 | error sending message to Common Event Service. | +| 1500008 | Common Event Service does not complete initialization. | + **Example** ```ts @@ -395,6 +425,17 @@ Unsubscribes from common events. This API uses an asynchronous callback to retur | subscriber | [CommonEventSubscriber](./js-apis-inner-commonEvent-commonEventSubscriber.md) | Yes | Subscriber object. | | callback | AsyncCallback\ | No | Callback used to return the result.| +**Error codes** + + For details about the error codes, see [Event Error Codes](../errorcodes/errorcode-CommonEventService.md). + +| ID| Error Message | +| -------- | ----------------------------------- | +| 401 | The parameter check failed. | +| 801 | capability not supported. | +| 1500007 | error sending message to Common Event Service. | +| 1500008 | Common Event Service does not complete initialization. | + **Example** ```ts @@ -465,6 +506,19 @@ Obtains the result code of this common event. This API uses an asynchronous call | -------- | ---------------------- | ---- | ------------------ | | callback | AsyncCallback\ | Yes | Callback used to return the result.| +**Error codes** + + For details about the error codes, see [Event Error Codes](../errorcodes/errorcode-CommonEventService.md). + +| ID| Error Message | +| -------- | ----------------------------------- | +| 201 | The application dose not have permission to call the interface. | +| 202 | not system app. | +| 401 | The parameter check failed. | +| 1500004 | not system service. | +| 1500007 | The message send error. | +| 1500008 | The CEMS error. | + **Example** ```ts @@ -495,6 +549,19 @@ Obtains the result code of this common event. This API uses a promise to return | ---------------- | -------------------- | | Promise\ | Promise used to return the result.| +**Error codes** + + For details about the error codes, see [Event Error Codes](../errorcodes/errorcode-CommonEventService.md). + +| ID| Error Message | +| -------- | ----------------------------------- | +| 201 | The application dose not have permission to call the interface. | +| 202 | not system app. | +| 401 | The parameter check failed. | +| 1500004 | not system service. | +| 1500007 | The message send error. | +| 1500008 | The CEMS error. | + **Example** ```ts diff --git a/en/application-dev/reference/apis/js-apis-notificationManager.md b/en/application-dev/reference/apis/js-apis-notificationManager.md index 2da6864b94f7e0068fb592202b1c51d5bb565b10..875b6129d039e09172fa9a1e366bd48a813749fc 100644 --- a/en/application-dev/reference/apis/js-apis-notificationManager.md +++ b/en/application-dev/reference/apis/js-apis-notificationManager.md @@ -33,6 +33,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -88,6 +89,8 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------------- | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -142,6 +145,8 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------------- | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -203,6 +208,8 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------------- | +| 201 | Permission denied. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -256,6 +263,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -298,6 +306,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -334,6 +343,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -369,6 +379,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -409,6 +420,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -448,6 +460,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -496,6 +511,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -535,6 +553,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -575,6 +594,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -614,6 +634,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -666,6 +689,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -709,6 +735,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -756,6 +783,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -791,6 +819,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -831,6 +860,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -866,6 +896,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -907,6 +938,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -942,6 +974,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -975,6 +1008,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1015,6 +1049,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1063,6 +1100,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1106,6 +1146,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1159,6 +1202,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1201,6 +1247,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1251,6 +1300,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1292,6 +1344,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1340,6 +1395,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1383,6 +1441,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1436,6 +1497,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1452,9 +1516,7 @@ Notification.isBadgeDisplayed(bundle).then((data) => { }); ``` - - -## Notification.setSlotByBundle +## notificationManager.setSlotByBundle setSlotByBundle(bundle: BundleOption, slot: NotificationSlot, callback: AsyncCallback\): void @@ -1480,6 +1542,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1533,6 +1598,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1579,6 +1647,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1632,6 +1703,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1675,6 +1749,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1728,6 +1805,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1771,6 +1851,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1815,6 +1898,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1849,6 +1935,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1889,6 +1976,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1923,6 +2011,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1963,6 +2052,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -1998,6 +2088,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2040,6 +2131,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2081,6 +2173,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2130,6 +2225,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2172,6 +2270,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2222,6 +2323,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2266,6 +2370,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2320,6 +2427,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2366,6 +2476,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2410,6 +2523,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2448,6 +2564,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2501,6 +2620,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2541,6 +2663,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2585,6 +2710,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2620,6 +2748,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2668,6 +2797,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2705,6 +2835,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2739,6 +2870,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2778,6 +2910,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2825,6 +2960,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2861,6 +2999,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2902,6 +3041,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2933,7 +3073,7 @@ Sets whether a specified application supports distributed notifications. This AP | Name | Type | Mandatory| Description | | -------- | ------------------------ | ---- | -------------------------- | -| bundle | [BundleOption](#bundleoption) | Yes | Bundle information of the application. | +| bundle | [BundleOption](./js-apis-inner-notification-notificationCommonDef.md#bundleoption) | Yes | Bundle information of the application. | | enable | boolean | Yes | Whether the application supports distributed notifications. | | callback | AsyncCallback\ | Yes | Callback used to return the result.| @@ -2943,6 +3083,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -2996,6 +3139,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -3041,6 +3187,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -3097,6 +3246,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -3140,6 +3292,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -3184,6 +3339,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -3224,6 +3382,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -3290,6 +3451,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -3352,6 +3516,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -3405,6 +3572,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -3451,6 +3621,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -3501,6 +3674,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -3544,6 +3720,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -3598,6 +3777,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -3640,6 +3822,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -3694,6 +3879,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -3738,6 +3926,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -3790,6 +3981,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | diff --git a/en/application-dev/reference/apis/js-apis-notificationSubscribe.md b/en/application-dev/reference/apis/js-apis-notificationSubscribe.md index 7acde9a1548e1ec17f5294e7e7e2d845d58a030e..4380c521dc82bf34771c17e238e4a7b56809276a 100644 --- a/en/application-dev/reference/apis/js-apis-notificationSubscribe.md +++ b/en/application-dev/reference/apis/js-apis-notificationSubscribe.md @@ -40,6 +40,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -92,6 +95,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -142,6 +148,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -187,6 +196,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -234,6 +246,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -279,6 +294,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -325,7 +343,7 @@ Removes a notification for a specified application. This API uses a promise to r | Name | Type | Mandatory| Description | | --------------- | --------------- | ---- | ---------- | | bundle | [BundleOption](js-apis-inner-notification-notificationCommonDef.md#bundleoption) | Yes | Bundle information of the application.| -| notificationKey | [NotificationKey](js-apis-notification.md#notificationkey)) | Yes | Notification key. | +| notificationKey | [NotificationKey](js-apis-notification.md#notificationkey) | Yes | Notification key. | | reason | [RemoveReason](#removereason) | Yes | Reason for removing the notification. | **Error codes** @@ -334,6 +352,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -382,6 +403,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -428,6 +452,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -459,7 +486,7 @@ Removes all notifications for a specified application. This API uses an asynchro | Name | Type | Mandatory| Description | | -------- | --------------------- | ---- | ---------------------------- | -| bundle | [BundleOption](js-apis-inner-notification-notificationCommonDef.md#bundleoption)) | Yes | Bundle information of the application. | +| bundle | [BundleOption](js-apis-inner-notification-notificationCommonDef.md#bundleoption) | Yes | Bundle information of the application. | | callback | AsyncCallback\ | Yes | Callback used to return the result.| **Error codes** @@ -468,6 +495,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -513,6 +543,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -547,7 +580,7 @@ Removes all notifications for a specified application. This API uses a promise t | Name | Type | Mandatory| Description | | ------ | ------------ | ---- | ---------- | -| bundle | [BundleOption](js-apis-inner-notification-notificationCommonDef.md#bundleoption)) | No | Bundle information of the application.| +| bundle | [BundleOption](js-apis-inner-notification-notificationCommonDef.md#bundleoption) | No | Bundle information of the application.| **Error codes** @@ -555,6 +588,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ---------------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -594,6 +630,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -639,6 +678,9 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/ | ID| Error Message | | -------- | ----------------------------------- | +| 201 | Permission denied. | +| 202 | Not system application to call the interface. | +| 401 | The parameter check failed. | | 1600001 | Internal error. | | 1600002 | Marshalling or unmarshalling error. | | 1600003 | Failed to connect service. | @@ -662,7 +704,7 @@ notificationSubscribe.removeAll(userId, removeAllCallback); ## NotificationSubscriber -Provides callbacks for receiving or removing notifications and serves as the input parameter of [subscribe](#notificationsubscribe). +Provides callbacks for receiving or removing notifications and serves as the input parameter of [subscribe](#notificationsubscribesubscribe). **System API**: This is a system API and cannot be called by third-party applications. @@ -670,7 +712,7 @@ Provides callbacks for receiving or removing notifications and serves as the inp onConsume?: (data: [SubscribeCallbackData](js-apis-notification.md#subscribecallbackdata)) => void -Callback for receiving notifications. +Called when a notification is received. **System capability**: SystemCapability.Notification.Notification @@ -710,7 +752,7 @@ notificationSubscribe.subscribe(subscriber, subscribeCallback); onCancel?:(data: [SubscribeCallbackData](js-apis-notification.md#subscribecallbackdata)) => void -Callback for canceling notifications. +Called when a notification is canceled. **System capability**: SystemCapability.Notification.Notification @@ -750,7 +792,7 @@ notificationSubscribe.subscribe(subscriber, subscribeCallback); onUpdate?:(data: [NotificationSortingMap](js-apis-notification.md#notificationsortingmap)) => void -Callback for notification sorting updates. +Called when the notification sorting list is updated. **System capability**: SystemCapability.Notification.Notification @@ -788,7 +830,7 @@ notificationSubscribe.subscribe(subscriber, subscribeCallback); onConnect?:() => void -Callback for subscription. +Called when subscription is complete. **System capability**: SystemCapability.Notification.Notification @@ -820,7 +862,7 @@ notificationSubscribe.subscribe(subscriber, subscribeCallback); onDisconnect?:() => void -Callback for unsubscription. +Called when unsubscription is complete. **System capability**: SystemCapability.Notification.Notification @@ -898,7 +940,7 @@ notificationSubscribe.subscribe(subscriber, subscribeCallback); onDoNotDisturbDateChange?:(mode: notification.[DoNotDisturbDate](js-apis-notificationManager.md#donotdisturbdate)) => void -Callback for DND time setting updates. +Called when the DND time setting is updated. **System capability**: SystemCapability.Notification.Notification @@ -935,7 +977,7 @@ notificationSubscribe.subscribe(subscriber, subscribeCallback); ### onEnabledNotificationChanged -onEnabledNotificationChanged?:(callbackData: [EnabledNotificationCallbackData](js-apis-notification.md#enablednotificationcallbackdata)) => void +onEnabledNotificationChanged?:(callbackData: [EnabledNotificationCallbackData](js-apis-notification.md#enablednotificationcallbackdata8)) => void Listens for the notification enabled status changes. This API uses an asynchronous callback to return the result. @@ -947,7 +989,7 @@ Listens for the notification enabled status changes. This API uses an asynchrono | Name| Type| Mandatory| Description| | ------------ | ------------------------ | ---- | -------------------------- | -| callback | AsyncCallback\<[EnabledNotificationCallbackData](js-apis-notification.md#enablednotificationcallbackdata)\> | Yes| Callback used to return the result.| +| callback | AsyncCallback\<[EnabledNotificationCallbackData](js-apis-notification.md#enablednotificationcallbackdata8)\> | Yes| Callback used to return the result.| **Example** @@ -973,47 +1015,6 @@ let subscriber = { notificationSubscribe.subscribe(subscriber, subscribeCallback); ``` -### onBadgeChanged10+ - - onBadgeChanged?:(data: [BadgeNumberCallbackData](#badgenumbercallbackdata)) => void - -Listens for the change of the notification badge number. - -**System capability**: SystemCapability.Notification.Notification - -**System API**: This is a system API and cannot be called by third-party applications. - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | ------------------------------------------------------------ | ---- | -------------------------- | -| callback | AsyncCallback\<[BadgeNumberCallbackData](#badgenumbercallbackdata)\> | Yes | Callback used to return the result.| - -**Example** - -```javascript -function subscribeCallback(err) { - if (err) { - console.error(`subscribe failed, code is ${err.code}, message is ${err.message}`); - } else { - console.info("subscribeCallback"); - } -}; - -function onBadgeChangedCallback(data) { - console.info("bundle: ", data.bundle); - console.info("uid: ", data.uid); - console.info("badgeNumber: ", data.badgeNumber); -}; - -let subscriber = { - onBadgeChanged: onBadgeChangedCallback -}; - -notificationSubscribe.subscribe(subscriber, subscribeCallback); -``` - - ## RemoveReason **System capability**: SystemCapability.Notification.Notification @@ -1024,15 +1025,3 @@ notificationSubscribe.subscribe(subscriber, subscribeCallback); | -------------------- | --- | -------------------- | | CLICK_REASON_REMOVE | 1 | The notification is removed after a click on it. | | CANCEL_REASON_REMOVE | 2 | The notification is removed by the user. | - -## BadgeNumberCallbackData10+ - -**System capability**: SystemCapability.Notification.Notification - -**System API**: This is a system API and cannot be called by third-party applications. - -| Name | Type | Readable| Writable| Description | -| ----------- | ------ | ---- | ---- | ------------ | -| bundle | string | Yes | No | Bundle name of the application.| -| uid | number | Yes | No | UID of the application. | -| badgeNumber | number | Yes | No | Notification badge number. | diff --git a/en/application-dev/reference/errorcodes/errorcode-request.md b/en/application-dev/reference/errorcodes/errorcode-request.md index 281c59764eacfc8a2b72ad15adfb8c65362ec19f..04018ff0de783db26d6e550c7543677efc491d0a 100644 --- a/en/application-dev/reference/errorcodes/errorcode-request.md +++ b/en/application-dev/reference/errorcodes/errorcode-request.md @@ -34,7 +34,7 @@ This error code is reported when a file path error occurs in invoking the **uplo **Possible Causes** -The file path is incorrect. +The file path is incorrect or the file aready exists in the path. **Solution** diff --git a/en/application-dev/ui/arkts-performance-improvement-recommendation.md b/en/application-dev/ui/arkts-performance-improvement-recommendation.md index 8d144767653ac90a89d9e72a83a292228c024a11..a9d8947578c4169b0980b1b719cdc68587b93ca1 100644 --- a/en/application-dev/ui/arkts-performance-improvement-recommendation.md +++ b/en/application-dev/ui/arkts-performance-improvement-recommendation.md @@ -219,54 +219,6 @@ struct MyComponent { ![flex1](figures/flex1.PNG) -## Setting Width and Height for \ Components - -When a **\** component is nested within a **\** component, all of its content will be loaded if its width and height is not specified, which may result in performance drop. - -```ts -@Entry -@Component -struct MyComponent { - private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; - - build() { - Scroll() { - List() { - ForEach(this.arr, (item) => { - ListItem() { - Text(`item value: ${item}`).fontSize(30).margin({ left: 10 }) - }.height(100) - }, (item) => item.toString()) - } - }.backgroundColor(Color.Pink) - } -} -``` - -Therefore, in the above scenario, you are advised to set the width and height for the **\** component as follows: - -```ts -@Entry -@Component -struct MyComponent { - private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; - - build() { - Scroll() { - List() { - ForEach(this.arr, (item) => { - ListItem() { - Text(`item value: ${item}`).fontSize(30).margin({ left: 10 }) - }.height(100) - }, (item) => item.toString()) - }.width('100%').height(500) - }.backgroundColor(Color.Pink) - } -} -``` - -![list1](figures/list1.gif) - ## Minimizing White Blocks During Swiping To minimize white blocks during swiping, expand the UI loading range by increasing the value of **cachedCount** for the **\** and **\** components. **cachedCount** indicates the number of list or grid items preloaded outside of the screen. diff --git a/en/application-dev/ui/figures/list1.gif b/en/application-dev/ui/figures/list1.gif deleted file mode 100644 index f421df651539da975e30d2294598e587e44d665e..0000000000000000000000000000000000000000 Binary files a/en/application-dev/ui/figures/list1.gif and /dev/null differ