未验证 提交 976ae300 编写于 作者: O openharmony_ci 提交者: Gitee

!17384 cherry-pick errorcode issue

Merge pull request !17384 from xuzhihao/OpenHarmony-3.2-Release
......@@ -34,8 +34,15 @@ deleteForm(formId: string, callback: AsyncCallback<void>): void
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 202 | The application is not a system application. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -82,8 +89,15 @@ deleteForm(formId: string): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**参数:**
......@@ -121,8 +135,15 @@ releaseForm(formId: string, callback: AsyncCallback<void>): void
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -161,8 +182,15 @@ releaseForm(formId: string, isReleaseCache: boolean, callback: AsyncCallback<
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -206,8 +234,15 @@ releaseForm(formId: string, isReleaseCache?: boolean): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -245,8 +280,15 @@ requestForm(formId: string, callback: AsyncCallback<void>): void
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -289,8 +331,15 @@ requestForm(formId: string): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -329,8 +378,15 @@ castToNormalForm(formId: string, callback: AsyncCallback<void>): void
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501002 | The number of forms exceeds upper bound. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -373,8 +429,15 @@ castToNormalForm(formId: string): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501002 | The number of forms exceeds upper bound. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -412,8 +475,13 @@ notifyVisibleForms(formIds: Array<string>, callback: AsyncCallback<void
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -456,8 +524,13 @@ notifyVisibleForms(formIds: Array<string>): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -495,8 +568,13 @@ notifyInvisibleForms(formIds: Array<string>, callback: AsyncCallback<vo
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -539,8 +617,13 @@ notifyInvisibleForms(formIds: Array<string>): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -578,8 +661,14 @@ enableFormsUpdate(formIds: Array<string>, callback: AsyncCallback<void&
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -622,8 +711,14 @@ enableFormsUpdate(formIds: Array<string>): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -661,8 +756,15 @@ disableFormsUpdate(formIds: Array<string>, callback: AsyncCallback<void
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -705,8 +807,15 @@ disableFormsUpdate(formIds: Array<string>): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -737,6 +846,14 @@ isSystemReady(callback: AsyncCallback<void>): void
| ------ | ------ | ---- | ------- |
| callback | AsyncCallback<void> | 是 | 回调函数。当检查系统是否准备好成功,err为undefined,否则为错误对象。 |
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
```ts
......@@ -766,6 +883,13 @@ isSystemReady(): Promise<void>
| -------- | -------- |
| Promise<void> | 无返回结果的Promise对象。 |
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 202 | The application is not a system application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
```ts
......@@ -791,6 +915,18 @@ getAllFormsInfo(callback: AsyncCallback<Array<formInfo.FormInfo>>):
**系统能力**:SystemCapability.Ability.Form
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -823,6 +959,17 @@ getAllFormsInfo(): Promise<Array<formInfo.FormInfo>>
**系统能力**:SystemCapability.Ability.Form
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**返回值:**
| 类型 | 说明 |
......@@ -864,8 +1011,14 @@ getFormsInfo(bundleName: string, callback: AsyncCallback<Array<formInfo.Fo
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -905,8 +1058,14 @@ getFormsInfo(bundleName: string, moduleName: string, callback: AsyncCallback<
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -951,8 +1110,14 @@ getFormsInfo(bundleName: string, moduleName?: string): Promise<Array<formI
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -985,6 +1150,18 @@ deleteInvalidForms(formIds: Array<string>, callback: AsyncCallback<numb
| formIds | Array<string> | 是 | 有效卡片标识列表。 |
| callback | AsyncCallback<number> | 是 | 回调函数。当根据列表删除应用程序的无效卡片成功,err为undefined,data为删除的卡片个数;否则为错误对象。 |
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
```ts
......@@ -1024,6 +1201,18 @@ deleteInvalidForms(formIds: Array<string>): Promise<number>
| :------------ | :---------------------------------- |
| Promise<number> | Promise对象,返回删除的卡片个数。 |
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
```ts
......@@ -1060,8 +1249,14 @@ acquireFormState(want: Want, callback: AsyncCallback<formInfo.FormStateInfo&g
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -1115,8 +1310,14 @@ acquireFormState(want: Want): Promise<formInfo.FormStateInfo>
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -1157,6 +1358,14 @@ on(type: 'formUninstall', callback: Callback<string>): void
| type | string | 是 | 填写'formUninstall',表示卡片卸载事件。 |
| callback | Callback<string> | 是 | 回调函数。返回卡片标识。 |
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
```ts
......@@ -1181,6 +1390,14 @@ off(type: 'formUninstall', callback?: Callback<string>): void
| type | string | 是 | 填写'formUninstall',表示卡片卸载事件。 |
| callback | Callback<string> | 否 | 回调函数。返回卡片标识。缺省时,表示注销所有已注册事件回调。 |
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
```ts
......@@ -1212,8 +1429,14 @@ notifyFormsVisible(formIds: Array<string>, isVisible: boolean, callback: A
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -1257,8 +1480,14 @@ notifyFormsVisible(formIds: Array<string>, isVisible: boolean): Promise&lt
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -1297,8 +1526,14 @@ notifyFormsEnableUpdate(formIds: Array<string>, isEnableUpdate: boolean, c
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -1342,8 +1577,14 @@ notifyFormsEnableUpdate(formIds: Array<string>, isEnableUpdate: boolean):
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -1381,9 +1622,14 @@ shareForm(formId: string, deviceId: string, callback: AsyncCallback<void>)
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -1428,8 +1674,14 @@ shareForm(formId: string, deviceId: string): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**参数:**
......@@ -1459,11 +1711,78 @@ notifyFormsPrivacyProtected(formIds: Array\<string>, isProtected: boolean, callb
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ------ | ---- | ------- |
| formId | string | 是 | 卡片标识。 |
| deviceId | string | 是 | 远程设备标识。 |
| formIds | Array\<string\> | 是 | 需要修改隐私保护的卡片标识列表。 |
| isProtected | boolean | 是 | 是否进行隐私保护。 |
| callback | AsyncCallback\<void> | 是 | 回调函数。当指定卡片设置隐私保护属性成功,error为undefined,否则为错误对象。 |
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
| 以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。 | |
**示例:**
```ts
var formIds = new Array('12400633174999288', '12400633174999289');
import formHost from '@ohos.app.form.formHost';
let formIds = new Array('12400633174999288', '12400633174999289');
try {
formHost.notifyFormsPrivacyProtected(formIds, true, (error) => {
if (error) {
console.error(`error, code: ${error.code}, message: ${error.message}`);
}
});
} catch(error) {
console.error(`catch error, code: ${error.code}, message: ${error.message}`);
}
```
## notifyFormsPrivacyProtected
function notifyFormsPrivacyProtected(formIds: Array\<string\>, isProtected: boolean): Promise\<void\>;
通知指定卡片隐私保护状态改变。使用Promise异步回调。
**需要权限**:ohos.permission.REQUIRE_FORM
**系统能力**:SystemCapability.Ability.Form
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ----------- | --------------- | ---- | -------------------------------- |
| formIds | Array\<string\> | 是 | 需要修改隐私保护的卡片标识列表。 |
| isProtected | boolean | 是 | 是否进行隐私保护。 |
**返回值:**
| 类型 | 说明 |
| ------------------- | ------------------------- |
| Promise&lt;void&gt; | 无返回结果的Promise对象。 |
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permissions denied. |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16501000 | An internal functional error occurred. |
| 以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。 | |
```ts
import formHost from '@ohos.app.form.formHost';
let formIds = new Array('12400633174999288', '12400633174999289');
try {
formHost.notifyFormsPrivacyProtected(formIds, true).then(() => {
console.log('formHost shareForm success');
......
......@@ -32,7 +32,14 @@ setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback&l
| 错误码ID | 错误信息 |
| -------- | -------- |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501002 | The number of forms exceeds upper bound. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -77,7 +84,14 @@ setFormNextRefreshTime(formId: string, minute: number): Promise&lt;void&gt;
| 错误码ID | 错误信息 |
| -------- | -------- |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501002 | The number of forms exceeds upper bound. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -115,7 +129,13 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData,call
| 错误码ID | 错误信息 |
| -------- | -------- |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -162,7 +182,13 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Pr
| 错误码ID | 错误信息 |
| -------- | -------- |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -196,11 +222,13 @@ getFormsInfo(callback: AsyncCallback&lt;Array&lt;formInfo.FormInfo&gt;&gt;): voi
| callback | AsyncCallback&lt;Array&lt;[FormInfo](js-apis-app-form-formInfo.md)&gt;&gt; | 是 | 回调函数。返回查询到的卡片信息。 |
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -238,7 +266,10 @@ getFormsInfo(filter: formInfo.FormInfoFilter, callback: AsyncCallback&lt;Array&l
| 错误码ID | 错误信息 |
| -------- | -------- |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -287,7 +318,10 @@ getFormsInfo(filter?: formInfo.FormInfoFilter): Promise&lt;Array&lt;formInfo.For
| 错误码ID | 错误信息 |
| -------- | -------- |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -331,8 +365,12 @@ requestPublishForm(want: Want, formBindingData: formBindingData.FormBindingData,
| 错误码ID | 错误信息 |
| -------- | -------- |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -381,8 +419,12 @@ requestPublishForm(want: Want, callback: AsyncCallback&lt;string&gt;): void
| 错误码ID | 错误信息 |
| -------- | -------- |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -436,8 +478,12 @@ requestPublishForm(want: Want, formBindingData?: formBindingData.FormBindingData
| 错误码ID | 错误信息 |
| -------- | -------- |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 16500050 | An IPC connection error happened. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -477,6 +523,16 @@ isRequestPublishFormSupported(callback: AsyncCallback&lt;boolean&gt;): void
| ------ | ------ | ---- | ------- |
| callback | AsyncCallback&lt;boolean&gt; | 是 | 回调函数。返回是否支持发布一张卡片到使用方。|
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
```ts
......@@ -530,6 +586,15 @@ isRequestPublishFormSupported(): Promise&lt;boolean&gt;
| :------------ | :---------------------------------- |
| Promise&lt;boolean&gt; | Promise对象。返回是否支持发布一张卡片到使用方。 |
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 202 | The application is not a system application. |
| 16500050 | An IPC connection error happened. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
```ts
......
......@@ -43,6 +43,14 @@ publish(event: string, callback: AsyncCallback\<void>): void
|1500008 |CEMS error|
|1500009 |system error|
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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. |
**示例:**
```ts
......@@ -88,6 +96,14 @@ publish(event: string, options: CommonEventPublishData, callback: AsyncCallback\
|1500009 |system error|
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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. |
**示例:**
......@@ -144,6 +160,15 @@ publishAsUser(event: string, userId: number, callback: AsyncCallback\<void>): vo
|1500008 |CEMS error|
|1500009 |system error|
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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. |
**示例:**
```ts
......@@ -196,6 +221,15 @@ publishAsUser(event: string, userId: number, options: CommonEventPublishData, ca
|1500008 |CEMS error|
|1500009 |system error|
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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. |
**示例:**
......@@ -243,6 +277,14 @@ createSubscriber(subscribeInfo: CommonEventSubscribeInfo, callback: AsyncCallbac
| subscribeInfo | [CommonEventSubscribeInfo](./js-apis-inner-commonEvent-commonEventSubscribeInfo.md) | 是 | 表示订阅信息。 |
| callback | AsyncCallback\<[CommonEventSubscriber](./js-apis-inner-commonEvent-commonEventSubscriber.md)> | 是 | 表示创建订阅者的回调方法。 |
**错误码:**
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
**示例:**
......@@ -293,6 +335,14 @@ createSubscriber(subscribeInfo: CommonEventSubscribeInfo): Promise\<CommonEventS
| --------------------------------------------------------- | ---------------- |
| Promise\<[CommonEventSubscriber](./js-apis-inner-commonEvent-commonEventSubscriber.md)> | 返回订阅者对象。 |
**错误码:**
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
**示例:**
```ts
......@@ -334,6 +384,17 @@ subscribe(subscriber: CommonEventSubscriber, callback: AsyncCallback\<CommonEven
| subscriber | [CommonEventSubscriber](./js-apis-inner-commonEvent-commonEventSubscriber.md) | 是 | 表示订阅者对象。 |
| callback | AsyncCallback\<[CommonEventData](./js-apis-inner-commonEvent-commonEventData.md)> | 是 | 表示接收公共事件数据的回调函数。 |
**错误码:**
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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. |
**示例:**
```ts
......@@ -395,6 +456,17 @@ unsubscribe(subscriber: CommonEventSubscriber, callback?: AsyncCallback\<void>):
| subscriber | [CommonEventSubscriber](./js-apis-inner-commonEvent-commonEventSubscriber.md) | 是 | 表示订阅者对象。 |
| callback | AsyncCallback\<void> | 否 | 表示取消订阅的回调方法。 |
**错误码:**
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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. |
**示例:**
```ts
......@@ -465,6 +537,19 @@ getCode(callback: AsyncCallback\<number>): void
| -------- | ---------------------- | ---- | ------------------ |
| callback | AsyncCallback\<number> | 是 | 公共事件的结果代码。 |
**错误码:**
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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. |
**示例:**
```ts
......@@ -495,6 +580,19 @@ getCode(): Promise\<number>
| ---------------- | -------------------- |
| Promise\<number> | 公共事件的结果代码。 |
**错误码:**
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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. |
**示例:**
```ts
......
......@@ -40,6 +40,18 @@ startAbility(want: Want, callback: AsyncCallback&lt;void&gt;): void
**系统能力**:SystemCapability.Ability.Form
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500100 | Failed to obtain the configuration information. |
| 16500101 | The application is not a system application. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -91,6 +103,18 @@ startAbility(want: Want): Promise&lt;void&gt;
| ------------ | ---------------------------------- |
| Promise&lt;void&lt; | 无返回结果的Promise对象。 |
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500100 | Failed to obtain the configuration information. |
| 16500101 | The application is not a system application. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
```ts
......
......@@ -33,6 +33,7 @@ publish(request: NotificationRequest, callback: AsyncCallback\<void\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -88,6 +89,8 @@ publish(request: NotificationRequest): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------------- |
| 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 @@ publish(request: NotificationRequest, userId: number, callback: AsyncCallback\<v
| 错误码ID | 错误信息 |
| -------- | ----------------------------------------- |
| 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 @@ publish(request: NotificationRequest, userId: number): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------------- |
| 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 @@ cancel(id: number, label: string, callback: AsyncCallback\<void\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -298,6 +306,7 @@ cancel(id: number, label?: string): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -334,6 +343,7 @@ cancel(id: number, callback: AsyncCallback\<void\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -369,6 +379,7 @@ cancelAll(callback: AsyncCallback\<void\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -409,6 +420,7 @@ cancelAll(): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -448,6 +460,9 @@ addSlot(slot: NotificationSlot, callback: AsyncCallback\<void\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ addSlot(slot: NotificationSlot): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ addSlot(type: SlotType, callback: AsyncCallback\<void\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -575,6 +594,7 @@ addSlot(type: SlotType): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -614,6 +634,9 @@ addSlots(slots: Array\<NotificationSlot\>, callback: AsyncCallback\<void\>): voi
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ addSlots(slots: Array\<NotificationSlot\>): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ getSlot(slotType: SlotType, callback: AsyncCallback\<NotificationSlot\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -756,6 +783,7 @@ getSlot(slotType: SlotType): Promise\<NotificationSlot\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -791,6 +819,7 @@ getSlots(callback: AsyncCallback<Array\<NotificationSlot\>>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -831,6 +860,7 @@ getSlots(): Promise\<Array\<NotificationSlot\>>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -866,6 +896,7 @@ removeSlot(slotType: SlotType, callback: AsyncCallback\<void\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -907,6 +938,7 @@ removeSlot(slotType: SlotType): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -942,6 +974,7 @@ removeAllSlots(callback: AsyncCallback\<void\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -975,6 +1008,7 @@ removeAllSlots(): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -1015,6 +1049,9 @@ setNotificationEnable(bundle: BundleOption, enable: boolean, callback: AsyncCall
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ setNotificationEnable(bundle: BundleOption, enable: boolean): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ isNotificationEnabled(bundle: BundleOption, callback: AsyncCallback\<boolean\>):
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ isNotificationEnabled(bundle: BundleOption): Promise\<boolean\>
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ isNotificationEnabled(callback: AsyncCallback\<boolean\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ isNotificationEnabled(): Promise\<boolean\>
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ displayBadge(bundle: BundleOption, enable: boolean, callback: AsyncCallback\<voi
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ displayBadge(bundle: BundleOption, enable: boolean): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ isBadgeDisplayed(bundle: BundleOption, callback: AsyncCallback\<boolean\>): void
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ isBadgeDisplayed(bundle: BundleOption): Promise\<boolean\>
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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\>): void
......@@ -1480,6 +1542,9 @@ setSlotByBundle(bundle: BundleOption, slot: NotificationSlot, callback: AsyncCal
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ setSlotByBundle(bundle: BundleOption, slot: NotificationSlot): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ getSlotsByBundle(bundle: BundleOption, callback: AsyncCallback<Array\<Notificati
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ getSlotsByBundle(bundle: BundleOption): Promise<Array\<NotificationSlot\>>
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ getSlotNumByBundle(bundle: BundleOption, callback: AsyncCallback\<number\>): voi
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ getSlotNumByBundle(bundle: BundleOption): Promise\<number\>
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ getAllActiveNotifications(callback: AsyncCallback<Array\<NotificationRequest\>>)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ getAllActiveNotifications(): Promise\<Array\<[NotificationRequest](js-apis-inner
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ getActiveNotificationCount(callback: AsyncCallback\<number\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -1889,6 +1976,7 @@ getActiveNotificationCount(): Promise\<number\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -1923,6 +2011,7 @@ getActiveNotifications(callback: AsyncCallback<Array\<NotificationRequest\>>): v
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -1963,6 +2052,7 @@ getActiveNotifications(): Promise\<Array\<[NotificationRequest](js-apis-inner-no
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -1998,6 +2088,7 @@ cancelGroup(groupName: string, callback: AsyncCallback\<void\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -2040,6 +2131,7 @@ cancelGroup(groupName: string): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -2081,6 +2173,9 @@ removeGroupByBundle(bundle: BundleOption, groupName: string, callback: AsyncCall
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ removeGroupByBundle(bundle: BundleOption, groupName: string): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ setDoNotDisturbDate(date: DoNotDisturbDate, callback: AsyncCallback\<void\>): vo
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ setDoNotDisturbDate(date: DoNotDisturbDate): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ setDoNotDisturbDate(date: DoNotDisturbDate, userId: number, callback: AsyncCallb
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ setDoNotDisturbDate(date: DoNotDisturbDate, userId: number): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ getDoNotDisturbDate(callback: AsyncCallback\<DoNotDisturbDate\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ getDoNotDisturbDate(): Promise\<DoNotDisturbDate\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ getDoNotDisturbDate(userId: number, callback: AsyncCallback\<DoNotDisturbDate\>)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ getDoNotDisturbDate(userId: number): Promise\<DoNotDisturbDate\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ isSupportDoNotDisturbMode(callback: AsyncCallback\<boolean\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ isSupportDoNotDisturbMode(): Promise\<boolean\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ isSupportTemplate(templateName: string, callback: AsyncCallback\<boolean\>): voi
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -2668,6 +2797,7 @@ isSupportTemplate(templateName: string): Promise\<boolean\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -2705,6 +2835,7 @@ requestEnableNotification(callback: AsyncCallback\<void\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -2739,6 +2870,7 @@ requestEnableNotification(): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -2778,6 +2910,9 @@ setDistributedEnable(enable: boolean, callback: AsyncCallback\<void\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ setDistributedEnable(enable: boolean): Promise\<void>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ isDistributedEnabled(callback: AsyncCallback\<boolean>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -2902,6 +3041,7 @@ isDistributedEnabled(): Promise\<boolean>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -2943,6 +3083,9 @@ setDistributedEnableByBundle(bundle: BundleOption, enable: boolean, callback: As
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ setDistributedEnableByBundle(bundle: BundleOption, enable: boolean): Promise\<vo
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ isDistributedEnabledByBundle(bundle: BundleOption, callback: AsyncCallback\<bool
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ isDistributedEnabledByBundle(bundle: BundleOption): Promise\<boolean>
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ getDeviceRemindType(callback: AsyncCallback\<DeviceRemindType\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ getDeviceRemindType(): Promise\<DeviceRemindType\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ publishAsBundle(request: NotificationRequest, representativeBundle: string, user
| 错误码ID | 错误信息 |
| -------- | ----------------------------------------- |
| 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 @@ publishAsBundle(request: NotificationRequest, representativeBundle: string, user
| 错误码ID | 错误信息 |
| -------- | ----------------------------------------- |
| 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 @@ cancelAsBundle(id: number, representativeBundle: string, userId: number, callbac
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ cancelAsBundle(id: number, representativeBundle: string, userId: number): Promis
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ setNotificationEnableSlot(bundle: BundleOption, type: SlotType, enable: boolean,
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ setNotificationEnableSlot(bundle: BundleOption, type: SlotType, enable: boolean)
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ isNotificationSlotEnabled(bundle: BundleOption, type: SlotType, callback: AsyncC
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ isNotificationSlotEnabled(bundle: BundleOption, type: SlotType): Promise\<boolea
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ setSyncNotificationEnabledWithoutApp(userId: number, enable: boolean, callback:
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ setSyncNotificationEnabledWithoutApp(userId: number, enable: boolean): Promise\<
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ getSyncNotificationEnabledWithoutApp(userId: number, callback: AsyncCallback\<bo
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ getSyncNotificationEnabledWithoutApp(userId: number): Promise\<boolean>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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. |
......
......@@ -40,6 +40,9 @@ subscribe(subscriber: NotificationSubscriber, info: NotificationSubscribeInfo, c
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ subscribe(subscriber: NotificationSubscriber, callback: AsyncCallback\<void\>):
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ subscribe(subscriber: NotificationSubscriber, info?: NotificationSubscribeInfo):
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ unsubscribe(subscriber: NotificationSubscriber, callback: AsyncCallback\<void\>)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ unsubscribe(subscriber: NotificationSubscriber): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ remove(bundle: BundleOption, notificationKey: NotificationKey, reason: RemoveRea
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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. |
......@@ -334,6 +352,9 @@ remove(bundle: BundleOption, notificationKey: NotificationKey, reason: RemoveRea
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ remove(hashCode: string, reason: RemoveReason, callback: AsyncCallback\<void\>):
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ remove(hashCode: string, reason: RemoveReason): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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. |
......@@ -468,6 +495,9 @@ removeAll(bundle: BundleOption, callback: AsyncCallback\<void\>): void
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ removeAll(callback: AsyncCallback\<void\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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. |
......@@ -555,6 +588,9 @@ removeAll(bundle?: BundleOption): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 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 @@ removeAll(userId: number, callback: AsyncCallback\<void>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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 @@ removeAll(userId: number): Promise\<void>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 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. |
......@@ -973,47 +1015,6 @@ let subscriber = {
notificationSubscribe.subscribe(subscriber, subscribeCallback);
```
### onBadgeChanged<sup>10+</sup>
onBadgeChanged?:(data: [BadgeNumberCallbackData](#badgenumbercallbackdata)) => void
监听应用角标个数变化。
**系统能力**:SystemCapability.Notification.Notification
**系统API**: 此接口为系统接口,三方应用不支持调用。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------------------------------------------------------------ | ---- | -------------------------- |
| callback | AsyncCallback\<[BadgeNumberCallbackData](#badgenumbercallbackdata)\> | 是 | 回调返回监听到的应用信息。 |
**示例:**
```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
**系统能力**:SystemCapability.Notification.Notification
......@@ -1024,15 +1025,3 @@ notificationSubscribe.subscribe(subscriber, subscribeCallback);
| -------------------- | --- | -------------------- |
| CLICK_REASON_REMOVE | 1 | 点击通知后删除通知。 |
| CANCEL_REASON_REMOVE | 2 | 用户删除通知。 |
## BadgeNumberCallbackData<sup>10+</sup>
**系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.Notification
**系统API**:此接口为系统接口,三方应用不支持调用。
| 名称 | 类型 | 可读 | 可写 | 描述 |
| ----------- | ------ | ---- | ---- | ------------ |
| bundle | string | 是 | 否 | 应用的包名。 |
| uid | number | 是 | 否 | 应用的uid。 |
| badgeNumber | number | 是 | 否 | 角标个数。 |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册