未验证 提交 9169a3b4 编写于 作者: O openharmony_ci 提交者: Gitee

!4177 【OpenHarmony开源贡献者计划2022】API相关格式及表达问题0520-b

Merge pull request !4177 from king_he/0520b
# Ability Access Control
# Ability Access Control
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/>
> **NOTE**<br>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
......@@ -20,9 +20,9 @@ Creates an **AtManager** instance, which is used for ability access control.
**Return value**
| Type| Description|
| -------- | -------- |
| [AtManager](#atmanager) | **AtManager** instance obtained.|
| Type | Description |
| -------- | -------- |
| [AtManager](#atmanager) | **AtManager** instance obtained. |
**Example**
......@@ -44,16 +44,16 @@ Checks whether an application has been granted the specified permission. This AP
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------- | ---- | ------------------------------------------ |
| tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to verify.|
| Name | Type | Mandatory | Description |
| -------- | ------------------- | ---- | ------------------------------------------ |
| tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to verify. |
**Return value**
| Type | Description |
| :------------ | :---------------------------------- |
| Promise&lt;GrantStatus&gt; | Promise instance used to return the result.|
| Type | Description |
| :------------ | :---------------------------------- |
| Promise&lt;GrantStatus&gt; | Promise used to return the result. |
**Example**
......@@ -78,17 +78,17 @@ Grants a user granted permission to an application. This API uses a promise to r
**Parameters**
| Name | Type | Mandatory| Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to grant.|
| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. |
| Name | Type | Mandatory | Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to grant. |
| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. |
**Return value**
| Type | Description |
| :------------ | :---------------------------------- |
| Promise&lt;number&gt; | Promise instance used to return the result.|
| Type | Description |
| :------------ | :---------------------------------- |
| Promise&lt;number&gt; | Promise used to return the result. |
**Example**
......@@ -115,12 +115,12 @@ Grants a user granted permission to an application. This API uses an asynchronou
**Parameters**
| Name | Type | Mandatory| Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to grant.|
| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. |
| callback | AsyncCallback&lt;number&gt; | Yes| Callback used to return the result.|
| Name | Type | Mandatory | Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to grant. |
| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. |
| callback | AsyncCallback&lt;number&gt; | Yes | Callback used to return the result. |
**Example**
......@@ -145,17 +145,17 @@ Revokes a user granted permission given to an application. This API uses a promi
**Parameters**
| Name | Type | Mandatory| Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to revoke.|
| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. |
| Name | Type | Mandatory | Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to revoke. |
| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. |
**Return value**
| Type | Description |
| :------------ | :---------------------------------- |
| Promise&lt;number&gt; | Promise instance used to return the result.|
| Type | Description |
| :------------ | :---------------------------------- |
| Promise&lt;number&gt; | Promise used to return the result. |
**Example**
......@@ -181,12 +181,12 @@ Revokes a user granted permission given to an application. This API uses an asyn
**Parameters**
| Name | Type | Mandatory| Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to revoke.|
| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. |
| callback | AsyncCallback&lt;number&gt; | Yes| Callback used to return the result.|
| Name | Type | Mandatory | Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to revoke. |
| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. |
| callback | AsyncCallback&lt;number&gt; | Yes | Callback used to return the result. |
**Example**
......@@ -210,16 +210,16 @@ Obtains the flags of the specified permission of a given application. This API u
**Parameters**
| Name | Type | Mandatory| Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to query.|
| Name | Type | Mandatory | Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to query. |
**Return value**
| Type | Description |
| :------------ | :---------------------------------- |
| Promise&lt;number&gt; | Promise instance used to return the result.|
| Type | Description |
| :------------ | :---------------------------------- |
| Promise&lt;number&gt; | Promise used to return the result. |
**Example**
......@@ -238,7 +238,7 @@ Enumerates the permission grant states.
**System capability**: SystemCapability.Security.AccessToken
| Name | Default Value | Description |
| ----------------------------- | ---------------------- | ----------------------- |
| PERMISSION_DENIED | -1 | Permission denied. |
| PERMISSION_GRANTED | 0 | Permission granted. |
| Name | Default Value | Description |
| ----------------------------- | ---------------------- | ----------------------- |
| PERMISSION_DENIED | -1 | Permission denied. |
| PERMISSION_GRANTED | 0 | Permission granted. |
# AbilityDelegatorRegistry
> **NOTE**
>
> **NOTE**<br>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
......@@ -18,13 +17,13 @@ Enumerates the ability lifecycle states.
**System capability**: SystemCapability.Ability.AbilityRuntime.Core
| Name | Value | Description |
| ------------- | ---- | --------------------------- |
| UNINITIALIZED | 0 | The ability is in an invalid state. |
| CREATE | 1 | The ability is created.|
| FOREGROUND | 2 | The ability is running in the foreground. |
| BACKGROUND | 3 | The ability is running in the background. |
| DESTROY | 4 | The ability is destroyed.|
| Name | Value | Description |
| ------------- | ---- | --------------------------- |
| UNINITIALIZED | 0 | The ability is in an invalid state. |
| CREATE | 1 | The ability is created. |
| FOREGROUND | 2 | The ability is running in the foreground. |
| BACKGROUND | 3 | The ability is running in the background. |
| DESTROY | 4 | The ability is destroyed. |
......@@ -38,9 +37,9 @@ Obtains the **AbilityDelegator** object of the application.
**Return value**
| Type | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
| [AbilityDelegator](js-apis-application-abilityDelegator.md#AbilityDelegator) | [AbilityDelegator](js-apis-application-abilityDelegator.md#AbilityDelegator) object, which can be used to schedule functions related to the test framework.|
| Type | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
| [AbilityDelegator](js-apis-application-abilityDelegator.md#AbilityDelegator) | [AbilityDelegator](js-apis-application-abilityDelegator.md#AbilityDelegator) object, which can be used to schedule functions related to the test framework. |
**Example**
......@@ -62,9 +61,9 @@ Obtains the **AbilityDelegatorArgs** object of the application.
**Return value**
| Type | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
| [AbilityDelegatorArgs](js-apis-application-abilityDelegatorArgs.md#AbilityDelegatorArgs) | [AbilityDelegatorArgs](js-apis-application-abilityDelegatorArgs.md#AbilityDelegatorArgs) object, which can be used to obtain test parameters.|
| Type | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
| [AbilityDelegatorArgs](js-apis-application-abilityDelegatorArgs.md#AbilityDelegatorArgs) | [AbilityDelegatorArgs](js-apis-application-abilityDelegatorArgs.md#AbilityDelegatorArgs) object, which can be used to obtain test parameters. |
**Example**
......
# AbilityRunningInfo
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
......@@ -25,14 +25,14 @@ abilitymanager.getAbilityRunningInfos((err,data) => {
**System capability**: SystemCapability.Ability.AbilityRuntime.Core
| Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- |
| ability | ElementName | Yes| No| Information that matches an ability. |
| pid | number | Yes| No| Process ID.|
| uid | number | Yes| No| User ID. |
| processName | string | Yes| No| Process name. |
| startTime | number | Yes| No| Ability start time. |
| abilityState | [abilityManager.AbilityState](#abilitymanagerabilitystate) | Yes| No| Ability state. |
| Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- |
| ability | ElementName | Yes | No | Information that matches an ability. |
| pid | number | Yes | No | Process ID. |
| uid | number | Yes | No | User ID. |
| processName | string | Yes | No | Process name. |
| startTime | number | Yes | No | Ability start time. |
| abilityState | [abilityManager.AbilityState](#abilitymanagerabilitystate) | Yes | No | Ability state. |
## abilityManager.AbilityState
......@@ -41,10 +41,10 @@ Enumerates the ability states.
**System capability**: SystemCapability.Ability.AbilityRuntime.Core
| Name| Value| Description|
| -------- | -------- | -------- |
| INITIAL | 0 | The ability is in the initial state.|
| FOREGROUND | 9 | The ability is in the foreground state. |
| BACKGROUND | 10 | The ability is in the background state. |
| FOREGROUNDING | 11 | The ability is in the foregrounding state. |
| BACKGROUNDING | 12 | The ability is in the backgrounding state. |
| Name | Value | Description |
| -------- | -------- | -------- |
| INITIAL | 0 | The ability is in the initial state. |
| FOREGROUND | 9 | The ability is in the foreground state. |
| BACKGROUND | 10 | The ability is in the background state. |
| FOREGROUNDING | 11 | The ability is in the foregrounding state. |
| BACKGROUNDING | 12 | The ability is in the backgrounding state. |
# AbilityStageContext
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
......@@ -28,7 +28,7 @@ class MyAbilityStage extends AbilityStage {
**System capability**: SystemCapability.Ability.AbilityRuntime.Core
| Name| Type| Readable| Writable| Description|
| Name| Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- |
| currentHapModuleInfo | HapModuleInfo | Yes| No| **ModuleInfo** object corresponding to the **AbilityStage**.|
| config | [Configuration](js-apis-configuration.md) | Yes| No| Configuration for the environment where the application is running.|
| currentHapModuleInfo | HapModuleInfo | Yes | No | **ModuleInfo** object corresponding to the **AbilityStage**. |
| config | [Configuration](js-apis-configuration.md) | Yes| No| Configuration for the environment where the application is running. |
# Accessibility
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
......@@ -15,11 +15,11 @@ Enumerates the states of an accessibility application.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description|
| -------- | -------- |
| enable | The accessibility application is enabled.|
| disable | The accessibility application is disabled.|
| install | The accessibility application has been installed.|
| Name | Description |
| -------- | -------- |
| enable | The accessibility application is enabled. |
| disable | The accessibility application is disabled. |
| install | The accessibility application has been installed. |
## AbilityType
......@@ -27,13 +27,13 @@ Enumerates the types of accessibility applications.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description|
| -------- | -------- |
| audible | The accessibility application provides audible feedback.|
| generic | The accessibility application provides generic feedback.|
| haptic | The accessibility application provides haptic feedback.|
| spoken | The accessibility application provides spoken feedback.|
| visual | The accessibility application provides visual feedback.|
| Name | Description |
| -------- | -------- |
| audible | The accessibility application provides audible feedback. |
| generic | The accessibility application provides generic feedback. |
| haptic | The accessibility application provides haptic feedback. |
| spoken | The accessibility application provides spoken feedback. |
| visual | The accessibility application provides visual feedback. |
## AccessibilityAbilityInfo
......@@ -43,15 +43,15 @@ Provides information about an accessibility application.
### Attributes
| Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- |
| id | number | Yes| No| Ability ID.|
| name | string | Yes| No| Ability name.|
| bundleName | string | Yes| No| Bundle name.|
| abilityTypes | Array&lt;[AbilityType](#abilitytype)&gt; | Yes| No| Accessibility application type.|
| capabilities | Array&lt;[Capability](#capability)&gt; | Yes| No| Capabilities list of the accessibility application.|
| description | string | Yes| No| Description of the accessibility application.|
| eventTypes | Array&lt;[EventType](#eventtype)&gt; | Yes| No| List of events that the accessibility application focuses on.|
| Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- |
| id | number | Yes | No | Ability ID. |
| name | string | Yes | No | Ability name. |
| bundleName | string | Yes | No | Bundle name. |
| abilityTypes | Array&lt;[AbilityType](#abilitytype)&gt; | Yes | No | Accessibility application type. |
| capabilities | Array&lt;[Capability](#capability)&gt; | Yes | No | Capabilities list of the accessibility application. |
| description | string | Yes | No | Description of the accessibility application. |
| eventTypes | Array&lt;[EventType](#eventtype)&gt; | Yes | No | List of events that the accessibility application focuses on. |
## Action
......@@ -59,24 +59,24 @@ Describes the target action supported by an accessibility application.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description|
| -------- | -------- |
| click | Clicking.|
| longClick | Long pressing.|
| scrollForward | Scrolling forward.|
| scrollBackward | Scrolling backward.|
| focus | Obtaining focus.|
| clearFocus | Clearing focus.|
| clearSelection | Clearing selection.|
| accessibilityFocus | Obtaining the accessibility focus.|
| clearAccessibilityFocus | Clearing the accessibility focus.|
| cut | Cut.|
| copy | Copy.|
| paste | Paste.|
| select | Select.|
| setText | Setting the text.|
| delete | Delete.|
| setSelection | Setting the selection.|
| Name | Description |
| -------- | -------- |
| click | Clicking. |
| longClick | Long pressing. |
| scrollForward | Scrolling forward. |
| scrollBackward | Scrolling backward. |
| focus | Obtaining focus. |
| clearFocus | Clearing focus. |
| clearSelection | Clearing selection. |
| accessibilityFocus | Obtaining the accessibility focus. |
| clearAccessibilityFocus | Clearing the accessibility focus. |
| cut | Cut. |
| copy | Copy. |
| paste | Paste. |
| select | Select. |
| setText | Setting the text. |
| delete | Delete. |
| setSelection | Setting the selection. |
## Capability
......@@ -84,13 +84,13 @@ Enumerates the capabilities of an auxiliary application.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description|
| -------- | -------- |
| retrieve | Capability to retrieve the window content.|
| touchGuide | Capability of touch guide mode.|
| keyEventObserver | Capability to filter key events.|
| zoom | Capability to control the display zoom level.|
| gesture | Capability to perform gesture actions.|
| Name | Description |
| -------- | -------- |
| retrieve | Capability to retrieve the window content. |
| touchGuide | Capability of touch guide mode. |
| keyEventObserver | Capability to filter key events. |
| zoom | Capability to control the display zoom level. |
| gesture | Capability to perform gesture actions. |
## CaptionsFontEdgeType<sup>8+</sup>
......@@ -98,13 +98,13 @@ Enumerates the caption font edge type.
**System capability**: SystemCapability.Barrierfree.Accessibility.Hearing
| Name| Description|
| -------- | -------- |
| none | No effect.|
| raised | Raised effect.|
| depressed | Depressed effect.|
| uniform | Uniform effect.|
| dropShadow | Drop shadow effect.|
| Name | Description |
| -------- | -------- |
| none | No effect. |
| raised | Raised effect. |
| depressed | Depressed effect. |
| uniform | Uniform effect. |
| dropShadow | Drop shadow effect. |
## CaptionsFontFamily<sup>8+</sup>
......@@ -112,16 +112,16 @@ Enumerates the caption font families.
**System capability**: SystemCapability.Barrierfree.Accessibility.Hearing
| Name| Description|
| -------- | -------- |
| default | Default font family.|
| monospacedSerif | Monospaced Serif fonts, which use the same width for each character.|
| serif | Serif fonts.|
| monospacedSansSerif | Monospaced Sans Serif fonts, which use the same width for each character.|
| sansSerif | Sans Serif fonts.|
| casual | Casual fonts.|
| cursive | Cursive fonts.|
| smallCapitals | Small caps fonts.|
| Name | Description |
| -------- | -------- |
| default | Default font family. |
| monospacedSerif | Monospaced Serif fonts, which use the same width for each character. |
| serif | Serif fonts. |
| monospacedSansSerif | Monospaced Sans Serif fonts, which use the same width for each character. |
| sansSerif | Sans Serif fonts. |
| casual | Casual fonts. |
| cursive | Cursive fonts. |
| smallCapitals | Small caps fonts. |
## CaptionsStyle<sup>8+</sup>
......@@ -129,14 +129,14 @@ Describes the caption style.
**System capability**: SystemCapability.Barrierfree.Accessibility.Hearing
| Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- |
| fontFamily | [CaptionsFontFamily](#captionsfontfamily8) | Yes| No| Font family of the captions.|
| fontScale | number | Yes| No| Font scale of the captions.|
| fontColor | number \| string | Yes| No| Font color of the captions.|
| fontEdgeType | [CaptionsFontEdgeType](#captionsfontedgetype8) | Yes| No| Font edge type of the captions.|
| backgroundColor | number \| string | Yes| No| Background color of the captions.|
| windowColor | number \| string | Yes| No| Window color of the captions.|
| Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- |
| fontFamily | [CaptionsFontFamily](#captionsfontfamily8) | Yes | No | Font family of the captions. |
| fontScale | number | Yes | No | Font scale of the captions. |
| fontColor | number \ | string | Yes | No | Font color of the captions. |
| fontEdgeType | [CaptionsFontEdgeType](#captionsfontedgetype8) | Yes | No | Font edge type of the captions. |
| backgroundColor | number \ | string | Yes | No | Background color of the captions. |
| windowColor | number \ | string | Yes | No | Window color of the captions. |
## CaptionsManager<sup>8+</sup>
......@@ -144,10 +144,10 @@ Implements caption configuration management.
### Attributes
| Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- |
| enabled | boolean | Yes| No| Whether to enable caption configuration.|
| style | [CaptionsStyle](#captionsstyle8) | Yes| No| Caption style.|
| Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- |
| enabled | boolean | Yes | No | Whether to enable caption configuration. |
| style | [CaptionsStyle](#captionsstyle8) | Yes | No | Caption style. |
### Methods
......@@ -163,10 +163,10 @@ Enables listening for enable status changes of caption configuration.
- **Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to listen for, which is set to **enableChange** in this API.|
| callback | Callback&lt;boolean&gt; | Yes| Callback invoked when the enable status of caption configuration changes.|
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| type | string | Yes | Type of the event to listen for, which is set to **enableChange** in this API. |
| callback | Callback&lt;boolean&gt; | Yes | Callback invoked when the enable status of caption configuration changes. |
- Example
......@@ -186,10 +186,10 @@ Enables listening for caption style changes.
- **Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to listen for, which is set to **styleChange** in this API.|
| callback | Callback&lt;[CaptionsStyle](#captionsstyle8)&gt; | Yes| Callback invoked when the caption style changes.|
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| type | string | Yes | Type of the event to listen for, which is set to **styleChange** in this API. |
| callback | Callback&lt;[CaptionsStyle](#captionsstyle8)&gt; | Yes | Callback invoked when the caption style changes. |
- Example
......@@ -209,10 +209,10 @@ Disables listening for enable status changes of caption configuration.
- **Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to listen for, which is set to **enableChange** in this API.|
| callback | Callback&lt;boolean&gt; | No| Callback invoked when the enable status of caption configuration changes.|
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| type | string | Yes | Type of the event to listen for, which is set to **enableChange** in this API. |
| callback | Callback&lt;boolean&gt; | No | Callback invoked when the enable status of caption configuration changes. |
- Example
......@@ -230,10 +230,10 @@ Disables listening for caption style changes.s is removed.
- **Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to listen for, which is set to **styleChange** in this API.|
| callback | Callback&lt;[CaptionsStyle](#captionsstyle8)&gt; | No| Callback invoked when the caption style changes.|
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| type | string | Yes | Type of the event to listen for, which is set to **styleChange** in this API. |
| callback | Callback&lt;[CaptionsStyle](#captionsstyle8)&gt; | No | Callback invoked when the caption style changes. |
- Example
......@@ -249,22 +249,22 @@ Describes a GUI change event.
### Attributes
| Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- |
| type | [EventType](#eventtype) | Yes| Yes| Accessibility event type.|
| windowUpdateType | [WindowUpdateType](#windowupdatetype) | Yes| Yes| Window update type.|
| bundleName | string | Yes| Yes| Target application name.|
| componentType | string | Yes| Yes| Type of the event source component, for example, button or chart.|
| pageId | number | Yes| Yes| Page ID of the event source.|
| description | string | Yes| Yes| Event description.|
| triggerAction | [Action](#action) | Yes| Yes| Action that triggers the event.|
| textMoveUnit | [TextMoveUnit](#textmoveunit) | Yes| Yes| Text movement unit.|
| contents | Array&lt;string&gt; | Yes| Yes| Array of contents.|
| lastContent | string | Yes| Yes| Latest content.|
| beginIndex | number | Yes| Yes| Sequence number of the first item displayed on the page.|
| currentIndex | number | Yes| Yes| Sequence number of the current item.|
| endIndex | number | Yes| Yes| Sequence number of the last item displayed on the page.|
| itemCount | number | Yes| Yes| Total number of items.|
| Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- |
| type | [EventType](#eventtype) | Yes | Yes | Accessibility event type. |
| windowUpdateType | [WindowUpdateType](#windowupdatetype) | Yes | Yes | Window update type. |
| bundleName | string | Yes | Yes | Target application name. |
| componentType | string | Yes | Yes | Type of the event source component, for example, button or chart. |
| pageId | number | Yes | Yes | Page ID of the event source. |
| description | string | Yes | Yes | Event description. |
| triggerAction | [Action](#action) | Yes | Yes | Action that triggers the event. |
| textMoveUnit | [TextMoveUnit](#textmoveunit) | Yes | Yes | Text movement unit. |
| contents | Array&lt;string&gt; | Yes | Yes | Array of contents. |
| lastContent | string | Yes | Yes | Latest content. |
| beginIndex | number | Yes | Yes | Sequence number of the first item displayed on the page. |
| currentIndex | number | Yes | Yes | Sequence number of the current item. |
| endIndex | number | Yes | Yes | Sequence number of the last item displayed on the page. |
| itemCount | number | Yes | Yes | Total number of items. |
## EventType
......@@ -272,19 +272,19 @@ Enumerates accessibility event types.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description|
| -------- | -------- |
| click | Event of clicking a component.|
| longClick | Event of long-pressing a component.|
| select | Event of selecting a component.|
| focus | Event indicating that the component obtains the focus.|
| textUpdate | Event indicating that the component text has been updated.|
| hoverEnter | Event indicating that the hover enters a component.|
| hoverExit | Event indicating that the hover exits a component.|
| scroll | Event of the scroll view.|
| textSelectionUpdate | Event indicating that the selected text has been updated.|
| accessibilityFocus | Event indicating that the accessibility focus has been obtained.|
| accessibilityFocusClear | Event indicating that the accessibility focus has been cleared.|
| Name | Description |
| -------- | -------- |
| click | Event of clicking a component. |
| longClick | Event of long-pressing a component. |
| select | Event of selecting a component. |
| focus | Event indicating that the component obtains the focus. |
| textUpdate | Event indicating that the component text has been updated. |
| hoverEnter | Event indicating that the hover enters a component. |
| hoverExit | Event indicating that the hover exits a component. |
| scroll | Event of the scroll view. |
| textSelectionUpdate | Event indicating that the selected text has been updated. |
| accessibilityFocus | Event indicating that the accessibility focus has been obtained. |
| accessibilityFocusClear | Event indicating that the accessibility focus has been cleared. |
## TextMoveUnit
......@@ -292,13 +292,13 @@ Enumerates the movement units for traversing the node text.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description|
| -------- | -------- |
| char | The movement unit for traversing the node text is by character.|
| word | The movement unit for traversing the node text is by word.|
| line | The movement unit for traversing the node text is by line.|
| page | The movement unit for traversing the node text is by page.|
| paragraph | The movement unit for traversing the node text is by paragraph.|
| Name | Description |
| -------- | -------- |
| char | The movement unit for traversing the node text is by character. |
| word | The movement unit for traversing the node text is by word. |
| line | The movement unit for traversing the node text is by line. |
| page | The movement unit for traversing the node text is by page. |
| paragraph | The movement unit for traversing the node text is by paragraph. |
## WindowUpdateType
......@@ -306,19 +306,19 @@ Enumerates window update types.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description|
| -------- | -------- |
| add | Window adding.|
| remove | Window deletion.|
| title | Window title change.|
| bounds | Window boundary change.|
| layer | Window layer change.|
| active | Window activity change.|
| focus | Window focus change.|
| accessibilityFocus | Window accessibility focus change.|
| parent | Parent window change.|
| children | Child window change.|
| pip | Picture-in-picture (PIP) mode change.|
| Name | Description |
| -------- | -------- |
| add | Window adding. |
| remove | Window deletion. |
| title | Window title change. |
| bounds | Window boundary change. |
| layer | Window layer change. |
| active | Window activity change. |
| focus | Window focus change. |
| accessibilityFocus | Window accessibility focus change. |
| parent | Parent window change. |
| children | Child window change. |
| pip | Picture-in-picture (PIP) mode change. |
## accessibility.getAbilityLists
......@@ -330,16 +330,16 @@ Obtains the accessibility application list. This API uses a promise to return th
- **Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| abilityType | [AbilityType](#abilitytype) | Yes| Accessibility application type.|
| stateType | [AbilityState](#abilitystate) | Yes| Accessibility application status.|
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| abilityType | [AbilityType](#abilitytype) | Yes | Accessibility application type. |
| stateType | [AbilityState](#abilitystate) | Yes | Accessibility application status. |
- Return value
| Type| Description|
| -------- | -------- |
| Promise&lt;Array&lt;[AccessibilityAbilityInfo](#accessibilityabilityinfo)&gt;&gt; | Promise used to return the accessibility application list.|
| Type | Description |
| -------- | -------- |
| Promise&lt;Array&lt;[AccessibilityAbilityInfo](#accessibilityabilityinfo)&gt;&gt; | Promise used to return the accessibility application list. |
- Example
......@@ -373,11 +373,11 @@ Obtains the accessibility application list. This API uses an asynchronous callba
- **Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| abilityType | [AbilityType](#abilitytype) | Yes| Accessibility application type.|
| stateType | [AbilityState](#abilitystate) | Yes| Accessibility application status.|
| callback | AsyncCallback&lt;Array&lt;[AccessibilityAbilityInfo](#accessibilityabilityinfo)&gt;&gt; | Yes| Callback used to return the accessibility application list.|
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| abilityType | [AbilityType](#abilitytype) | Yes | Accessibility application type. |
| stateType | [AbilityState](#abilitystate) | Yes | Accessibility application status. |
| callback | AsyncCallback&lt;Array&lt;[AccessibilityAbilityInfo](#accessibilityabilityinfo)&gt;&gt; | Yes | Callback used to return the accessibility application list. |
- Example
......@@ -412,9 +412,9 @@ Obtains the accessibility caption configuration.
- Return value
| Type| Description|
| -------- | -------- |
| [CaptionsManager](#captionsmanager8) | Accessibility caption configuration.|
| Type | Description |
| -------- | -------- |
| [CaptionsManager](#captionsmanager8) | Accessibility caption configuration. |
- Example
......@@ -430,10 +430,10 @@ Enables listening for the accessibility application or touch guide mode status c
- **Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to listen for.<br>-&nbsp;**accessibilityStateChange** means to listen for enable status changes of the accessibility application.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Core<br>-&nbsp;**touchGuideStateChange** means to listen for enable status changes of the touch guide mode.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Vision|
| callback | Callback&lt;boolean&gt; | Yes| Callback invoked when the enable status changes.|
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| type | string | Yes | Type of the event to listen for.<br>-&nbsp;**accessibilityStateChange** means to listen for enable status changes of the accessibility application.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Core<br>-&nbsp;**touchGuideStateChange** means to listen for enable status changes of the touch guide mode.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Vision |
| callback | Callback&lt;boolean&gt; | Yes | Callback invoked when the enable status changes. |
- Example
......@@ -453,10 +453,10 @@ Disables listening for the accessibility application or touch guide mode status
- **Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | No| Type of the event to listen for.<br>-&nbsp;**accessibilityStateChange** means to listen for enable status changes of the accessibility application.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Core<br>-&nbsp;**touchGuideStateChange** means to listen for enable status changes of the touch guide mode.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Vision|
| callback | Callback&lt;boolean&gt; | No| Callback invoked when the enable status changes.|
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| type | string | No | Type of the event to listen for.<br>-&nbsp;**accessibilityStateChange** means to listen for enable status changes of the accessibility application.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Core<br>-&nbsp;**touchGuideStateChange** means to listen for enable status changes of the touch guide mode.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Vision |
| callback | Callback&lt;boolean&gt; | No | Callback invoked when the enable status changes. |
- Example
......@@ -476,9 +476,9 @@ Checks whether accessibility is enabled. This API uses a promise to return the r
- Return value
| Type| Description|
| -------- | -------- |
| Promise&lt;boolean&gt; | Returns **true** if accessibility is enabled; returns **false** otherwise.|
| Type | Description |
| -------- | -------- |
| Promise&lt;boolean&gt; | Returns **true** if accessibility is enabled; returns **false** otherwise. |
- Example
......@@ -501,9 +501,9 @@ Checks whether accessibility is enabled. This API uses an asynchronous callback
- Parameters
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;boolean&gt; | Yes| Callback used to return the result. Returns **true** if accessibility is enabled; returns **false** otherwise.|
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return the result. Returns **true** if accessibility is enabled; returns **false** otherwise. |
- Example
......@@ -527,9 +527,9 @@ Checks whether touch guide mode is enabled. This API uses a promise to return th
- Return value
| Type| Description|
| -------- | -------- |
| Promise&lt;boolean&gt; | Returns **true** if touch guide mode is enabled; returns **false** otherwise.|
| Type | Description |
| -------- | -------- |
| Promise&lt;boolean&gt; | Returns **true** if touch guide mode is enabled; returns **false** otherwise. |
- Example
......@@ -552,9 +552,9 @@ Checks whether touch guide mode is enabled. This API uses an asynchronous callba
- Parameters
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;boolean&gt; | Yes| Callback used to return the result. Returns **true** if touch guide mode is enabled; returns **false** otherwise.|
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return the result. Returns **true** if touch guide mode is enabled; returns **false** otherwise. |
- Example
......@@ -578,15 +578,15 @@ Sends an accessibility event. This API uses a promise to return the result.
- **Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| event | [EventInfo](#eventinfo) | Yes| Accessibility event.|
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| event | [EventInfo](#eventinfo) | Yes | Accessibility event. |
- Return value
| Type| Description|
| -------- | -------- |
| Promise&lt;void&gt; | Promise used to return the result. Returns data if the accessibility event is sent successfully; returns an error otherwise.|
| Type | Description |
| -------- | -------- |
| Promise&lt;void&gt; | Promise used to return the result. Returns data if the accessibility event is sent successfully; returns an error otherwise. |
- Example
......@@ -609,10 +609,10 @@ Sends an accessibility event. This API uses an asynchronous callback to return t
- **Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| event | [EventInfo](#eventinfo) | Yes| Accessibility event.|
| callback | AsyncCallback&lt;void&gt; | Yes| Callback used to return the result. Returns data if the accessibility event is sent successfully; returns an error otherwise.|
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| event | [EventInfo](#eventinfo) | Yes | Accessibility event. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result. Returns data if the accessibility event is sent successfully; returns an error otherwise. |
- Example
......
# Animation<a name="EN-US_TOPIC_0000001127125026"></a>
>![](../../public_sys-resources/icon-note.gif) **NOTE:**
>The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> **NOTE:**<br>
> The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import<a name="s0e7b1e85a4274f58a8206e0b065bd80c"></a>
......
# App Account Management
# App Account Management
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/>
> **NOTE**<br>
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
......@@ -20,9 +20,9 @@ Creates an **AppAccountManager** instance.
**System capability**: SystemCapability.Account.AppAccount
**Return Value**
| Type | Description |
| ----------------- | ------------ |
| AppAccountManager | **AppAccountManager** instance created.|
| Type | Description |
| ----------------- | ------------ |
| AppAccountManager | **AppAccountManager** instance created. |
**Example**
```js
......@@ -43,10 +43,10 @@ Adds an app account to the account management service. This method uses an async
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | --------------------- |
| name | string | Yes | Name of the app account to add. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account is added.|
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | --------------------- |
| name | string | Yes | Name of the app account to add. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account is added. |
**Example**
......@@ -67,11 +67,11 @@ Adds an app account and its additional information to the account management ser
**Parameters**
| Name | Type | Mandatory | Description |
| --------- | ------------------------- | ---- | ---------------------------------------- |
| name | string | Yes | Name of the app account to add. |
| extraInfo | string | Yes | Additional information (for example, token) of the app account to add. The additional information cannot contain sensitive information about the app account.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account and its additional information are added. |
| Name | Type | Mandatory | Description |
| --------- | ------------------------- | ---- | ---------------------------------------- |
| name | string | Yes | Name of the app account to add. |
| extraInfo | string | Yes | Additional information (for example, token) of the app account to add. The additional information cannot contain sensitive information about the app account. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account and its additional information are added. |
**Example**
......@@ -94,16 +94,16 @@ Adds an app account and its additional information to the account management ser
**Parameters**
| Name | Type | Mandatory | Description |
| --------- | ------ | ---- | -------------------------------- |
| name | string | Yes | Name of the app account to add. |
| extraInfo | string | Yes | Additional information of the app account to add. The additional information cannot contain sensitive information about the app account.|
| Name | Type | Mandatory | Description |
| --------- | ------ | ---- | -------------------------------- |
| name | string | Yes | Name of the app account to add. |
| extraInfo | string | Yes | Additional information of the app account to add. The additional information cannot contain sensitive information about the app account. |
**Return Value**
| Type | Description |
| ------------------- | --------------------- |
| Promise&lt;void&gt; | Promise used to return the result.|
| Type | Description |
| ------------------- | --------------------- |
| Promise&lt;void&gt; | Promise used to return the result. |
**Example**
......@@ -126,12 +126,12 @@ Implicitly adds an app account based on the specified account owner, authenticat
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | --------------------- | ---- | --------------- |
| owner | string | Yes | Bundle name of the app account to add.|
| authType | string | Yes | Authentication type of the app account to add. |
| options | {[key: string]: any} | Yes | Options for the authentication. |
| callback | AuthenticatorCallback | Yes | Authenticator callback invoked to return the authentication result.|
| Name | Type | Mandatory | Description |
| -------- | --------------------- | ---- | --------------- |
| owner | string | Yes | Bundle name of the app account to add. |
| authType | string | Yes | Authentication type of the app account to add. |
| options | {[key: string]: any} | Yes | Options for the authentication. |
| callback | AuthenticatorCallback | Yes | Authenticator callback invoked to return the authentication result. |
**Example**
......@@ -167,10 +167,10 @@ Deletes an app account from the account management service. This method uses an
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | ----------------- |
| name | string | Yes | Name of the app account to delete. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account is deleted.|
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | ----------------- |
| name | string | Yes | Name of the app account to delete. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account is deleted. |
**Example**
......@@ -191,15 +191,15 @@ Deletes an app account from the account management service. This method uses a p
**Parameters**
| Name | Type | Mandatory | Description |
| ---- | ------ | ---- | ------------ |
| name | string | Yes | Name of the app account to delete.|
| Name | Type | Mandatory | Description |
| ---- | ------ | ---- | ------------ |
| name | string | Yes | Name of the app account to delete. |
**Return Value**
| Type | Description |
| :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result.|
| Type | Description |
| :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result. |
**Example**
......@@ -222,11 +222,11 @@ Disables an app account from accessing an application with the given bundle name
**Parameters**
| Name | Type | Mandatory | Description |
| ---------- | ------------------------- | ---- | ------------------------------- |
| name | string | Yes | App account name. |
| bundleName | string | Yes | Bundle name of an app. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account is disabled from accessing the application with the given bundle name.|
| Name | Type | Mandatory | Description |
| ---------- | ------------------------- | ---- | ------------------------------- |
| name | string | Yes | App account name. |
| bundleName | string | Yes | Bundle name of an app. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account is disabled from accessing the application with the given bundle name. |
**Example**
......@@ -247,16 +247,16 @@ Disables an app account from accessing an application with the given bundle name
**Parameters**
| Name | Type | Mandatory | Description |
| ---------- | ------ | ---- | ----------------- |
| name | string | Yes | App account name.|
| bundleName | string | Yes | Bundle name of an app. |
| Name | Type | Mandatory | Description |
| ---------- | ------ | ---- | ----------------- |
| name | string | Yes | App account name. |
| bundleName | string | Yes | Bundle name of an app. |
**Return Value**
| Type | Description |
| :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result.|
| Type | Description |
| :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result. |
**Example**
......@@ -279,11 +279,11 @@ Enables an app account to access an application with the given bundle name. This
**Parameters**
| Name | Type | Mandatory | Description |
| ---------- | ------------------------- | ---- | ------------------------------- |
| name | string | Yes | App account name. |
| bundleName | string | Yes | Bundle name of an app. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account is enabled to access the application with the given bundle name.|
| Name | Type | Mandatory | Description |
| ---------- | ------------------------- | ---- | ------------------------------- |
| name | string | Yes | App account name. |
| bundleName | string | Yes | Bundle name of an app. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account is enabled to access the application with the given bundle name. |
**Example**
......@@ -304,16 +304,16 @@ Enables an app account to access an application with the given bundle name. This
**Parameters**
| Name | Type | Mandatory | Description |
| ---------- | ------ | ---- | --------- |
| name | string | Yes | App account name. |
| bundleName | string | Yes | Bundle name of an app.|
| Name | Type | Mandatory | Description |
| ---------- | ------ | ---- | --------- |
| name | string | Yes | App account name. |
| bundleName | string | Yes | Bundle name of an app. |
**Return Value**
| Type | Description |
| :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result.|
| Type | Description |
| :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result. |
**Example**
......@@ -337,10 +337,10 @@ Checks whether an app account allows application data synchronization. This meth
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ---------------------------- | ---- | ---------------------- |
| name | string | Yes | App account name. |
| callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return whether the app account allows application data synchronization.|
| Name | Type | Mandatory | Description |
| -------- | ---------------------------- | ---- | ---------------------- |
| name | string | Yes | App account name. |
| callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return whether the app account allows application data synchronization. |
**Example**
......@@ -364,15 +364,15 @@ Checks whether an app account allows application data synchronization. This meth
**Parameters**
| Name | Type | Mandatory | Description |
| ---- | ------ | ---- | ------- |
| name | string | Yes | App account name.|
| Name | Type | Mandatory | Description |
| ---- | ------ | ---- | ------- |
| name | string | Yes | App account name. |
**Return Value**
| Type | Description |
| :--------------------- | :-------------------- |
| Promise&lt;boolean&gt; | Promise used to return the result.|
| Type | Description |
| :--------------------- | :-------------------- |
| Promise&lt;boolean&gt; | Promise used to return the result. |
**Example**
......@@ -395,12 +395,12 @@ Sets a credential for an app account. This method uses an asynchronous callback
**Parameters**
| Name | Type | Mandatory | Description |
| -------------- | ------------------------- | ---- | -------------- |
| name | string | Yes | App account name. |
| credentialType | string | Yes | Type of the credential to set. |
| credential | string | Yes | Credential to set. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when a credential is set for the specified app account.|
| Name | Type | Mandatory | Description |
| -------------- | ------------------------- | ---- | -------------- |
| name | string | Yes | App account name. |
| credentialType | string | Yes | Type of the credential to set. |
| credential | string | Yes | Credential to set. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when a credential is set for the specified app account. |
**Example**
......@@ -421,17 +421,17 @@ Sets a credential for an app account. This method uses a promise to return the r
**Parameters**
| Name | Type | Mandatory | Description |
| -------------- | ------ | ---- | ---------- |
| name | string | Yes | App account name. |
| credentialType | string | Yes | Type of the credential to set.|
| credential | string | Yes | Credential to set. |
| Name | Type | Mandatory | Description |
| -------------- | ------ | ---- | ---------- |
| name | string | Yes | App account name. |
| credentialType | string | Yes | Type of the credential to set. |
| credential | string | Yes | Credential to set. |
**Return Value**
| Type | Description |
| :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result.|
| Type | Description |
| :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result. |
**Example**
......@@ -454,11 +454,11 @@ Sets additional information for an app account. This method uses an asynchronous
**Parameters**
| Name | Type | Mandatory | Description |
| --------- | ------------------------- | ---- | ---------------- |
| name | string | Yes | App account name. |
| extraInfo | string | Yes | Additional information to set. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when additional information is set for the specified app account.|
| Name | Type | Mandatory | Description |
| --------- | ------------------------- | ---- | ---------------- |
| name | string | Yes | App account name. |
| extraInfo | string | Yes | Additional information to set. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when additional information is set for the specified app account. |
**Example**
......@@ -479,16 +479,16 @@ Sets additional information for an app account. This method uses a promise to re
**Parameters**
| Name | Type | Mandatory | Description |
| --------- | ------ | ---- | --------- |
| name | string | Yes | App account name. |
| extraInfo | string | Yes | Additional information to set.|
| Name | Type | Mandatory | Description |
| --------- | ------ | ---- | --------- |
| name | string | Yes | App account name. |
| extraInfo | string | Yes | Additional information to set. |
**Return Value**
| Type | Description |
| :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result.|
| Type | Description |
| :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result. |
**Example**
......@@ -513,11 +513,11 @@ Sets whether to enable application data synchronization for an app account. This
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | ------------------------- |
| name | string | Yes | App account name. |
| isEnable | boolean | Yes | Whether to enable app data synchronization. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when application data synchronization is enabled or disabled for the app account.|
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | ------------------------- |
| name | string | Yes | App account name. |
| isEnable | boolean | Yes | Whether to enable app data synchronization. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when application data synchronization is enabled or disabled for the app account. |
**Example**
......@@ -540,16 +540,16 @@ Sets whether to enable application data synchronization for an app account. This
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ------- | ---- | ----------- |
| name | string | Yes | App account name. |
| isEnable | boolean | Yes | Whether to enable app data synchronization.|
| Name | Type | Mandatory | Description |
| -------- | ------- | ---- | ----------- |
| name | string | Yes | App account name. |
| isEnable | boolean | Yes | Whether to enable app data synchronization. |
**Return Value**
| Type | Description |
| :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result.|
| Type | Description |
| :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result. |
**Example**
......@@ -572,12 +572,12 @@ Sets data to be associated with an app account. This method uses an asynchronous
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | ----------------- |
| name | string | Yes | App account name. |
| key | string | Yes | Key of the data to set. The private key can be customized.|
| value | string | Yes | Value of the data to be set. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the data associated with the specified app account is set.|
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | ----------------- |
| name | string | Yes | App account name. |
| key | string | Yes | Key of the data to set. The private key can be customized. |
| value | string | Yes | Value of the data to be set. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the data associated with the specified app account is set. |
**Example**
......@@ -597,17 +597,17 @@ Sets data to be associated with an app account. This method uses a promise to re
**Parameters**
| Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----------------- |
| name | string | Yes | App account name. |
| key | string | Yes | Key of the data to set. The private key can be customized.|
| value | string | Yes | Value of the data to be set. |
| Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----------------- |
| name | string | Yes | App account name. |
| key | string | Yes | Key of the data to set. The private key can be customized. |
| value | string | Yes | Value of the data to be set. |
**Return Value**
| Type | Description |
| :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result.|
| Type | Description |
| :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result. |
**Example**
......@@ -630,11 +630,11 @@ Obtains the credential of an app account. This method uses an asynchronous callb
**Parameters**
| Name | Type | Mandatory | Description |
| -------------- | --------------------------- | ---- | -------------- |
| name | string | Yes | App account name. |
| credentialType | string | Yes | Type of the credential to obtain. |
| callback | AsyncCallback&lt;string&gt; | Yes | Callback invoked to return the credential of the specified app account.|
| Name | Type | Mandatory | Description |
| -------------- | --------------------------- | ---- | -------------- |
| name | string | Yes | App account name. |
| credentialType | string | Yes | Type of the credential to obtain. |
| callback | AsyncCallback&lt;string&gt; | Yes | Callback invoked to return the credential of the specified app account. |
**Example**
......@@ -656,16 +656,16 @@ Obtains the credential of an app account. This method uses a promise to return t
**Parameters**
| Name | Type | Mandatory | Description |
| -------------- | ------ | ---- | ---------- |
| name | string | Yes | App account name. |
| credentialType | string | Yes | Type of the credential to obtain.|
| Name | Type | Mandatory | Description |
| -------------- | ------ | ---- | ---------- |
| name | string | Yes | App account name. |
| credentialType | string | Yes | Type of the credential to obtain. |
**Return Value**
| Type | Description |
| :-------------------- | :-------------------- |
| Promise&lt;string&gt; | Promise used to return the result.|
| Type | Description |
| :-------------------- | :-------------------- |
| Promise&lt;string&gt; | Promise used to return the result. |
**Example**
......@@ -688,10 +688,10 @@ Obtains additional information of an app account. This method uses an asynchrono
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | --------------------------- | ---- | ---------------- |
| name | string | Yes | App account name. |
| callback | AsyncCallback&lt;string&gt; | Yes | Callback invoked to return the additional information of the specified app account.|
| Name | Type | Mandatory | Description |
| -------- | --------------------------- | ---- | ---------------- |
| name | string | Yes | App account name. |
| callback | AsyncCallback&lt;string&gt; | Yes | Callback invoked to return the additional information of the specified app account. |
**Example**
......@@ -713,15 +713,15 @@ Obtains additional information of an app account. This method uses a promise to
**Parameters**
| Name | Type | Mandatory | Description |
| ---- | ------ | ---- | ------- |
| name | string | Yes | App account name.|
| Name | Type | Mandatory | Description |
| ---- | ------ | ---- | ------- |
| name | string | Yes | App account name. |
**Return Value**
| Type | Description |
| :-------------------- | :-------------------- |
| Promise&lt;string&gt; | Promise used to return the result.|
| Type | Description |
| :-------------------- | :-------------------- |
| Promise&lt;string&gt; | Promise used to return the result. |
**Example**
......@@ -744,11 +744,11 @@ Obtains data associated with an app account. This method uses an asynchronous ca
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | --------------------------- | ---- | ----------------- |
| name | string | Yes | App account name. |
| key | string | Yes | Key of the data to obtain. |
| callback | AsyncCallback&lt;string&gt; | Yes | Callback invoked to return the data associated with the specified app account.|
| Name | Type | Mandatory | Description |
| -------- | --------------------------- | ---- | ----------------- |
| name | string | Yes | App account name. |
| key | string | Yes | Key of the data to obtain. |
| callback | AsyncCallback&lt;string&gt; | Yes | Callback invoked to return the data associated with the specified app account. |
**Example**
......@@ -770,16 +770,16 @@ Obtains data associated with an app account. This method uses a promise to retur
**Parameters**
| Name | Type | Mandatory | Description |
| ---- | ------ | ---- | ----------- |
| name | string | Yes | App account name. |
| key | string | Yes | Key of the data to obtain.|
| Name | Type | Mandatory | Description |
| ---- | ------ | ---- | ----------- |
| name | string | Yes | App account name. |
| key | string | Yes | Key of the data to obtain. |
**Return Value**
| Type | Description |
| :-------------------- | :-------------------- |
| Promise&lt;string&gt; | Promise used to return the result.|
| Type | Description |
| :-------------------- | :-------------------- |
| Promise&lt;string&gt; | Promise used to return the result. |
**Example**
......@@ -804,9 +804,9 @@ Obtains information about all accessible app accounts. This method uses an async
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | -------- |
| callback | AsyncCallback&lt;Array&lt;AppAccountInfo&gt;&gt; | Yes | Callback invoked to return information about all accessible app accounts.|
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | -------- |
| callback | AsyncCallback&lt;Array&lt;AppAccountInfo&gt;&gt; | Yes | Callback invoked to return information about all accessible app accounts. |
**Example**
......@@ -830,9 +830,9 @@ Obtains information about all accessible app accounts. This method uses an async
**Parameters**
| Type | Description |
| ---------------------------------------- | --------------------- |
| Promise&lt;Array&lt;AppAccountInfo&gt;&gt; | Promise used to return the result.|
| Type | Description |
| ---------------------------------------- | --------------------- |
| Promise&lt;Array&lt;AppAccountInfo&gt;&gt; | Promise used to return the result. |
**Example**
......@@ -857,10 +857,10 @@ Obtains information about all app accounts of the specified app. This method use
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | -------- |
| owner | string | Yes | Bundle name of the app. |
| callback | AsyncCallback&lt;Array&lt;AppAccountInfo&gt;&gt; | Yes | Callback invoked to return information about all accessible app accounts.|
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | -------- |
| owner | string | Yes | Bundle name of the app. |
| callback | AsyncCallback&lt;Array&lt;AppAccountInfo&gt;&gt; | Yes | Callback invoked to return information about all accessible app accounts. |
**Example**
......@@ -885,15 +885,15 @@ Obtains information about all app accounts of the specified app. This method use
**Parameters**
| Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----- |
| owner | string | Yes | Bundle name of the app.|
| Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----- |
| owner | string | Yes | Bundle name of the app. |
**Parameters**
| Type | Description |
| ---------------------------------------- | --------------------- |
| Promise&lt;Array&lt;AppAccountInfo&gt;&gt; | Promise used to return the result.|
| Type | Description |
| ---------------------------------------- | --------------------- |
| Promise&lt;Array&lt;AppAccountInfo&gt;&gt; | Promise used to return the result. |
**Example**
......@@ -917,11 +917,11 @@ Subscribes to the account change event of the specified account owners. This met
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ------------------------------ |
| type | 'change' | Yes | Type of the event to subscribe to. The subscriber will receive a notification when the account owners update their accounts.|
| owners | Array&lt;string&gt; | Yes | Owners of the accounts. |
| callback | Callback&lt;Array&lt;AppAccountInfo&gt;&gt; | Yes | Callback invoked to return the account change. |
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ------------------------------ |
| type | 'change' | Yes | Type of the event to subscribe to. The subscriber will receive a notification when the account owners update their accounts. |
| owners | Array&lt;string&gt; | Yes | Owners of the accounts. |
| callback | Callback&lt;Array&lt;AppAccountInfo&gt;&gt; | Yes | Callback invoked to return the account change. |
**Example**
......@@ -948,10 +948,10 @@ Unsubscribes from the account change event. This method uses an asynchronous cal
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | -------------------------------- | ---- | ------------ |
| type | 'change' | Yes | Account change event to unsubscribe from. |
| callback | Callback<Array\<AppAccountInfo>> | No | Callback used to report the account change.|
| Name | Type | Mandatory | Description |
| -------- | -------------------------------- | ---- | ------------ |
| type | 'change' | Yes | Account change event to unsubscribe from. |
| callback | Callback<Array\<AppAccountInfo>> | No | Callback used to report the account change. |
**Example**
......@@ -981,13 +981,13 @@ Authenticates an app account to obtain the Open Authorization (OAuth) access tok
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | --------------------- | ---- | --------------- |
| name | string | Yes | Name of the app account to authenticate. |
| owner | string | Yes | Bundle name of the app.|
| authType | string | Yes | Authentication type. |
| options | {[key: string]: any} | Yes | Options for the authentication. |
| callback | AuthenticatorCallback | Yes | Authenticator callback invoked to return the authentication result.|
| Name | Type | Mandatory | Description |
| -------- | --------------------- | ---- | --------------- |
| name | string | Yes | Name of the app account to authenticate. |
| owner | string | Yes | Bundle name of the app. |
| authType | string | Yes | Authentication type. |
| options | {[key: string]: any} | Yes | Options for the authentication. |
| callback | AuthenticatorCallback | Yes | Authenticator callback invoked to return the authentication result. |
**Example**
......@@ -1023,12 +1023,12 @@ Obtains the OAuth access token of an app account based on the specified authenti
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | --------------------------- | ---- | ----------- |
| name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app.|
| authType | string | Yes | Authentication type. |
| callback | AsyncCallback&lt;string&gt; | Yes | Callback invoked to return the result. |
| Name | Type | Mandatory | Description |
| -------- | --------------------------- | ---- | ----------- |
| name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app. |
| authType | string | Yes | Authentication type. |
| callback | AsyncCallback&lt;string&gt; | Yes | Callback invoked to return the result. |
**Example**
......@@ -1050,17 +1050,17 @@ Obtains the OAuth access token of an app account based on the specified authenti
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ------ | ---- | ----------- |
| name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app.|
| authType | string | Yes | Authentication type. |
| Name | Type | Mandatory | Description |
| -------- | ------ | ---- | ----------- |
| name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app. |
| authType | string | Yes | Authentication type. |
**Parameters**
| Type | Description |
| --------------------- | --------------------- |
| Promise&lt;string&gt; | Promise used to return the result.|
| Type | Description |
| --------------------- | --------------------- |
| Promise&lt;string&gt; | Promise used to return the result. |
**Example**
......@@ -1083,12 +1083,12 @@ Sets an OAuth access token for an app account. This method uses an asynchronous
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | -------- |
| name | string | Yes | App account name.|
| authType | string | Yes | Authentication type. |
| token | string | Yes | OAuth access token to set.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result.|
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | -------- |
| name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. |
| token | string | Yes | OAuth access token to set. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. |
**Example**
......@@ -1109,17 +1109,17 @@ Sets an OAuth access token for an app account. This method uses a promise to ret
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ------ | ---- | -------- |
| name | string | Yes | App account name.|
| authType | string | Yes | Authentication type. |
| token | string | Yes | OAuth access token to set.|
| Name | Type | Mandatory | Description |
| -------- | ------ | ---- | -------- |
| name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. |
| token | string | Yes | OAuth access token to set. |
**Parameters**
| Type | Description |
| ------------------- | --------------------- |
| Promise&lt;void&gt; | Promise used to return the result.|
| Type | Description |
| ------------------- | --------------------- |
| Promise&lt;void&gt; | Promise used to return the result. |
**Example**
......@@ -1142,13 +1142,13 @@ Deletes the specified OAuth access token for an app account. This method uses an
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | ------------ |
| name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app. |
| authType | string | Yes | Authentication type. |
| token | string | Yes | OAuth access token to delete.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. |
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | ------------ |
| name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app. |
| authType | string | Yes | Authentication type. |
| token | string | Yes | OAuth access token to delete. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. |
**Example**
......@@ -1169,18 +1169,18 @@ Deletes the specified OAuth access token for an app account. This method uses a
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ------ | ---- | ------------ |
| name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app. |
| authType | string | Yes | Authentication type. |
| token | string | Yes | OAuth access token to delete.|
| Name | Type | Mandatory | Description |
| -------- | ------ | ---- | ------------ |
| name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app. |
| authType | string | Yes | Authentication type. |
| token | string | Yes | OAuth access token to delete. |
**Parameters**
| Type | Description |
| ------------------- | --------------------- |
| Promise&lt;void&gt; | Promise used to return the result.|
| Type | Description |
| ------------------- | --------------------- |
| Promise&lt;void&gt; | Promise used to return the result. |
**Example**
......@@ -1203,13 +1203,13 @@ Sets the visibility of an OAuth access token to the specified app. This method u
**Parameters**
| Name | Type | Mandatory | Description |
| ---------- | ------------------------- | ---- | ------------ |
| name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. |
| bundleName | string | Yes | Bundle name of the app.|
| isVisible | boolean | Yes | Whether the OAuth access token is visible to the app. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. |
| Name | Type | Mandatory | Description |
| ---------- | ------------------------- | ---- | ------------ |
| name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. |
| bundleName | string | Yes | Bundle name of the app. |
| isVisible | boolean | Yes | Whether the OAuth access token is visible to the app. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. |
**Example**
......@@ -1230,18 +1230,18 @@ Sets the visibility of an OAuth access token to the specified app. This method u
**Parameters**
| Name | Type | Mandatory | Description |
| ---------- | ------- | ---- | ------------ |
| name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. |
| bundleName | string | Yes | Bundle name of the app.|
| isVisible | boolean | Yes | Whether the OAuth access token is visible to the app. |
| Name | Type | Mandatory | Description |
| ---------- | ------- | ---- | ------------ |
| name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. |
| bundleName | string | Yes | Bundle name of the app. |
| isVisible | boolean | Yes | Whether the OAuth access token is visible to the app. |
**Parameters**
| Type | Description |
| ------------------- | --------------------- |
| Promise&lt;void&gt; | Promise used to return the result.|
| Type | Description |
| ------------------- | --------------------- |
| Promise&lt;void&gt; | Promise used to return the result. |
**Example**
......@@ -1264,12 +1264,12 @@ Checks whether an OAuth token is visible to the specified app. This method uses
**Parameters**
| Name | Type | Mandatory | Description |
| ---------- | ---------------------------- | ---- | ------------- |
| name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. |
| bundleName | string | Yes | Bundle name of the app.|
| callback | AsyncCallback&lt;boolean&gt; | Yes | Callback invoked to return the result. |
| Name | Type | Mandatory | Description |
| ---------- | ---------------------------- | ---- | ------------- |
| name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. |
| bundleName | string | Yes | Bundle name of the app. |
| callback | AsyncCallback&lt;boolean&gt; | Yes | Callback invoked to return the result. |
**Example**
......@@ -1291,17 +1291,17 @@ Checks whether an OAuth token is visible to the specified app. This method uses
**Parameters**
| Name | Type | Mandatory | Description |
| ---------- | ------ | ---- | ------------- |
| name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. |
| bundleName | string | Yes | Bundle name of the app.|
| Name | Type | Mandatory | Description |
| ---------- | ------ | ---- | ------------- |
| name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. |
| bundleName | string | Yes | Bundle name of the app. |
**Parameters**
| Type | Description |
| ---------------------- | --------------------- |
| Promise&lt;boolean&gt; | Promise used to return the result.|
| Type | Description |
| ---------------------- | --------------------- |
| Promise&lt;boolean&gt; | Promise used to return the result. |
**Example**
......@@ -1324,11 +1324,11 @@ Obtains information about all OAuth access tokens of an app account visible to t
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ----------- |
| name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app.|
| callback | AsyncCallback&lt;Array&lt;OAuthTokenInfo&gt;&gt; | Yes | Callback invoked to return the result. |
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ----------- |
| name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app. |
| callback | AsyncCallback&lt;Array&lt;OAuthTokenInfo&gt;&gt; | Yes | Callback invoked to return the result. |
**Example**
......@@ -1350,16 +1350,16 @@ Obtains information about all OAuth access tokens of an app account visible to t
**Parameters**
| Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----------- |
| name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app.|
| Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----------- |
| name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app. |
**Parameters**
| Type | Description |
| ---------------------------------------- | --------------------- |
| Promise&lt;Array&lt;OAuthTokenInfo&gt;&gt; | Promise used to return the result.|
| Type | Description |
| ---------------------------------------- | --------------------- |
| Promise&lt;Array&lt;OAuthTokenInfo&gt;&gt; | Promise used to return the result. |
**Example**
......@@ -1382,11 +1382,11 @@ Obtains the authorization list of OAuth access tokens of an app account. This me
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ----------- |
| name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app.|
| callback | AsyncCallback&lt;Array&lt;string&gt;&gt; | Yes | Callback invoked to return the result. |
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ----------- |
| name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app. |
| callback | AsyncCallback&lt;Array&lt;string&gt;&gt; | Yes | Callback invoked to return the result. |
**Example**
......@@ -1408,16 +1408,16 @@ Obtains the authorization list of OAuth access tokens of an app account. This me
**Parameters**
| Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----------- |
| name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app.|
| Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----------- |
| name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app. |
**Parameters**
| Type | Description |
| ---------------------------------- | --------------------- |
| Promise&lt;Array&lt;string&gt;&gt; | Promise used to return the result.|
| Type | Description |
| ---------------------------------- | --------------------- |
| Promise&lt;Array&lt;string&gt;&gt; | Promise used to return the result. |
**Example**
......@@ -1440,10 +1440,10 @@ Obtains the authenticator callback for a session. This method uses an asynchrono
**Parameters**
| Name | Type | Mandatory | Description |
| --------- | ---------------------------------------- | ---- | -------- |
| sessionId | string | Yes | ID of the session to authenticate.|
| callback | AsyncCallback&lt;AuthenticatorCallback&gt; | Yes | Callback invoked to return the result.|
| Name | Type | Mandatory | Description |
| --------- | ---------------------------------------- | ---- | -------- |
| sessionId | string | Yes | ID of the session to authenticate. |
| callback | AsyncCallback&lt;AuthenticatorCallback&gt; | Yes | Callback invoked to return the result. |
**Example**
......@@ -1475,15 +1475,15 @@ Obtains the authenticator callback for a session. This method uses a promise to
**Parameters**
| Name | Type | Mandatory | Description |
| --------- | ------ | ---- | -------- |
| sessionId | string | Yes | ID of the session to authenticate.|
| Name | Type | Mandatory | Description |
| --------- | ------ | ---- | -------- |
| sessionId | string | Yes | ID of the session to authenticate. |
**Parameters**
| Type | Description |
| ------------------------------------ | --------------------- |
| Promise&lt;AuthenticatorCallback&gt; | Promise used to return the result.|
| Type | Description |
| ------------------------------------ | --------------------- |
| Promise&lt;AuthenticatorCallback&gt; | Promise used to return the result. |
**Example**
......@@ -1515,10 +1515,10 @@ Obtains authenticator information of an app account. This method uses an asynchr
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | -------------------------------------- | ---- | ----------- |
| owner | string | Yes | Bundle name of the app.|
| callback | AsyncCallback&lt;AuthenticatorInfo&gt; | Yes | Callback invoked to return the result. |
| Name | Type | Mandatory | Description |
| -------- | -------------------------------------- | ---- | ----------- |
| owner | string | Yes | Bundle name of the app. |
| callback | AsyncCallback&lt;AuthenticatorInfo&gt; | Yes | Callback invoked to return the result. |
**Example**
......@@ -1540,15 +1540,15 @@ Obtains authenticator information of an app account. This method uses a promise
**Parameters**
| Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----------- |
| owner | string | Yes | Bundle name of the app.|
| Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----------- |
| owner | string | Yes | Bundle name of the app. |
**Parameters**
| Type | Description |
| -------------------------------- | --------------------- |
| Promise&lt;AuthenticatorInfo&gt; | Promise used to return the result.|
| Type | Description |
| -------------------------------- | --------------------- |
| Promise&lt;AuthenticatorInfo&gt; | Promise used to return the result. |
**Example**
......@@ -1567,10 +1567,10 @@ Defines app account information.
**System capability**: SystemCapability.Account.AppAccount
| Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----------- |
| owner | string | Yes | Bundle name of the app.|
| name | string | Yes | App account name. |
| Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----------- |
| owner | string | Yes | Bundle name of the app. |
| name | string | Yes | App account name. |
## OAuthTokenInfo<sup>8+</sup>
......@@ -1578,10 +1578,10 @@ Defines OAuth access token information.
**System capability**: SystemCapability.Account.AppAccount
| Name | Type | Mandatory | Description |
| -------- | ------ | ---- | -------- |
| authType | string | Yes | Authentication type.|
| token | string | Yes | Value of the access token. |
| Name | Type | Mandatory | Description |
| -------- | ------ | ---- | -------- |
| authType | string | Yes | Authentication type. |
| token | string | Yes | Value of the access token. |
## AuthenticatorInfo<sup>8+</sup>
......@@ -1589,11 +1589,11 @@ Defines OAuth authenticator information.
**System capability**: SystemCapability.Account.AppAccount
| Name | Type | Mandatory | Description |
| ------- | ------ | ---- | ---------- |
| owner | string | Yes | Bundle name of the authenticator owner.|
| iconId | string | Yes | ID of the authenticator icon. |
| labelId | string | Yes | ID of the authenticator label. |
| Name | Type | Mandatory | Description |
| ------- | ------ | ---- | ---------- |
| owner | string | Yes | Bundle name of the authenticator owner. |
| iconId | string | Yes | ID of the authenticator icon. |
| labelId | string | Yes | ID of the authenticator label. |
## Constants<sup>8+</sup>
......@@ -1601,19 +1601,19 @@ Enumerates the constants.
**System capability**: SystemCapability.Account.AppAccount
| Name | Default Value | Description |
| ----------------------------- | ---------------------- | ------------- |
| ACTION_ADD_ACCOUNT_IMPLICITLY | "addAccountImplicitly" | Operation for implicitly adding an account. |
| ACTION_AUTHENTICATE | "authenticate" | Authentication operation. |
| KEY_NAME | "name" | App account name. |
| KEY_OWNER | "owner" | App account owner.|
| KEY_TOKEN | "token" | OAuth access token. |
| KEY_ACTION | "action" | Action. |
| KEY_AUTH_TYPE | "authType" | Authentication type. |
| KEY_SESSION_ID | "sessionId" | Session ID. |
| KEY_CALLER_PID | "callerPid" | Caller process ID (PID). |
| KEY_CALLER_UID | "callerUid" | Caller user ID (UID). |
| KEY_CALLER_BUNDLE_NAME | "callerBundleName" | Caller bundle name. |
| Name | Default Value | Description |
| ----------------------------- | ---------------------- | ------------- |
| ACTION_ADD_ACCOUNT_IMPLICITLY | "addAccountImplicitly" | Operation for implicitly adding an account. |
| ACTION_AUTHENTICATE | "authenticate" | Authentication operation. |
| KEY_NAME | "name" | App account name. |
| KEY_OWNER | "owner" | App account owner. |
| KEY_TOKEN | "token" | OAuth access token. |
| KEY_ACTION | "action" | Action. |
| KEY_AUTH_TYPE | "authType" | Authentication type. |
| KEY_SESSION_ID | "sessionId" | Session ID. |
| KEY_CALLER_PID | "callerPid" | Caller process ID (PID). |
| KEY_CALLER_UID | "callerUid" | Caller user ID (UID). |
| KEY_CALLER_BUNDLE_NAME | "callerBundleName" | Caller bundle name. |
## ResultCode<sup>8+</sup>
......@@ -1621,27 +1621,27 @@ Enumerates the result codes.
**System capability**: SystemCapability.Account.AppAccount
| Name | Default Value | Description |
| ----------------------------------- | ----- | ------------ |
| SUCCESS | 0 | The operation is successful. |
| ERROR_ACCOUNT_NOT_EXIST | 10001 | The app account does not exist. |
| ERROR_APP_ACCOUNT_SERVICE_EXCEPTION | 10002 | The app account service is abnormal. |
| ERROR_INVALID_PASSWORD | 10003 | The password is invalid. |
| ERROR_INVALID_REQUEST | 10004 | The request is invalid. |
| ERROR_INVALID_RESPONSE | 10005 | The response is invalid. |
| ERROR_NETWORK_EXCEPTION | 10006 | The network is abnormal. |
| ERROR_OAUTH_AUTHENTICATOR_NOT_EXIST | 10007 | The authenticator does not exist. |
| ERROR_OAUTH_CANCELED | 10008 | The authentication is canceled. |
| ERROR_OAUTH_LIST_TOO_LARGE | 10009 | The size of the OAuth list exceeds the limit. |
| ERROR_OAUTH_SERVICE_BUSY | 10010 | The OAuth service is busy. |
| ERROR_OAUTH_SERVICE_EXCEPTION | 10011 | The OAuth service is abnormal. |
| ERROR_OAUTH_SESSION_NOT_EXIST | 10012 | The session to be authenticated does not exist. |
| ERROR_OAUTH_TIMEOUT | 10013 | The authentication timed out. |
| ERROR_OAUTH_TOKEN_NOT_EXIST | 10014 | The OAuth access token does not exist.|
| ERROR_OAUTH_TOKEN_TOO_MANY | 10015 | The number of OAuth access tokens reaches the limit. |
| ERROR_OAUTH_UNSUPPORT_ACTION | 10016 | The authentication operation is not supported. |
| ERROR_OAUTH_UNSUPPORT_AUTH_TYPE | 10017 | The authentication type is not supported. |
| ERROR_PERMISSION_DENIED | 10018 | The required permission is missing. |
| Name | Default Value | Description |
| ----------------------------------- | ----- | ------------ |
| SUCCESS | 0 | The operation is successful. |
| ERROR_ACCOUNT_NOT_EXIST | 10001 | The app account does not exist. |
| ERROR_APP_ACCOUNT_SERVICE_EXCEPTION | 10002 | The app account service is abnormal. |
| ERROR_INVALID_PASSWORD | 10003 | The password is invalid. |
| ERROR_INVALID_REQUEST | 10004 | The request is invalid. |
| ERROR_INVALID_RESPONSE | 10005 | The response is invalid. |
| ERROR_NETWORK_EXCEPTION | 10006 | The network is abnormal. |
| ERROR_OAUTH_AUTHENTICATOR_NOT_EXIST | 10007 | The authenticator does not exist. |
| ERROR_OAUTH_CANCELED | 10008 | The authentication is canceled. |
| ERROR_OAUTH_LIST_TOO_LARGE | 10009 | The size of the OAuth list exceeds the limit. |
| ERROR_OAUTH_SERVICE_BUSY | 10010 | The OAuth service is busy. |
| ERROR_OAUTH_SERVICE_EXCEPTION | 10011 | The OAuth service is abnormal. |
| ERROR_OAUTH_SESSION_NOT_EXIST | 10012 | The session to be authenticated does not exist. |
| ERROR_OAUTH_TIMEOUT | 10013 | The authentication timed out. |
| ERROR_OAUTH_TOKEN_NOT_EXIST | 10014 | The OAuth access token does not exist. |
| ERROR_OAUTH_TOKEN_TOO_MANY | 10015 | The number of OAuth access tokens reaches the limit. |
| ERROR_OAUTH_UNSUPPORT_ACTION | 10016 | The authentication operation is not supported. |
| ERROR_OAUTH_UNSUPPORT_AUTH_TYPE | 10017 | The authentication type is not supported. |
| ERROR_PERMISSION_DENIED | 10018 | The required permission is missing. |
## AuthenticatorCallback<sup>8+</sup>
......@@ -1656,10 +1656,10 @@ Called back to send the authentication result.
**System capability**: SystemCapability.Account.AppAccount
**Parameters**
| Name | Type | Mandatory | Description |
| ------ | -------------------- | ---- | ------ |
| code | number | Yes | Authentication result code.|
| result | {[key: string]: any} | Yes | Authentication result. |
| Name | Type | Mandatory | Description |
| ------ | -------------------- | ---- | ------ |
| code | number | Yes | Authentication result code. |
| result | {[key: string]: any} | Yes | Authentication result. |
**Example**
......@@ -1686,9 +1686,9 @@ Called back to redirect an authentication request.
**System capability**: SystemCapability.Account.AppAccount
**Parameters**
| Name | Type | Mandatory | Description |
| ------- | ---- | ---- | ---------- |
| request | Want | Yes | Request to be redirected.|
| Name | Type | Mandatory | Description |
| ------- | ---- | ---- | ---------- |
| request | Want | Yes | Request to be redirected. |
**Example**
......@@ -1723,12 +1723,12 @@ Implicitly adds an app account based on the specified authentication type and op
**System capability**: SystemCapability.Account.AppAccount
**Parameters**
| Name | Type | Mandatory | Description |
| ---------------- | --------------------- | ---- | --------------- |
| authType | string | Yes | Authentication type. |
| callerBundleName | string | Yes | Bundle name of the authentication requester. |
| options | {[key: string]: any} | Yes | Options for the authentication. |
| callback | AuthenticatorCallback | Yes | Authenticator callback invoked to return the authentication result.|
| Name | Type | Mandatory | Description |
| ---------------- | --------------------- | ---- | --------------- |
| authType | string | Yes | Authentication type. |
| callerBundleName | string | Yes | Bundle name of the authentication requester. |
| options | {[key: string]: any} | Yes | Options for the authentication. |
| callback | AuthenticatorCallback | Yes | Authenticator callback invoked to return the authentication result. |
### authenticate<sup>8+</sup>
......@@ -1739,13 +1739,13 @@ Authenticates an app account to obtain the OAuth access token. This method uses
**System capability**: SystemCapability.Account.AppAccount
**Parameters**
| Name | Type | Mandatory | Description |
| ---------------- | --------------------- | ---- | --------------- |
| name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. |
| callerBundleName | string | Yes | Bundle name of the authentication requester. |
| options | {[key: string]: any} | Yes | Options for the authentication. |
| callback | AuthenticatorCallback | Yes | Authenticator callback invoked to return the authentication result.|
| Name | Type | Mandatory | Description |
| ---------------- | --------------------- | ---- | --------------- |
| name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. |
| callerBundleName | string | Yes | Bundle name of the authentication requester. |
| options | {[key: string]: any} | Yes | Options for the authentication. |
| callback | AuthenticatorCallback | Yes | Authenticator callback invoked to return the authentication result. |
**Example**
......@@ -1771,4 +1771,4 @@ Authenticates an app account to obtain the OAuth access token. This method uses
return new MyAuthenticator();
}
}
```
```
\ No newline at end of file
# MissionSnapshot
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
......@@ -21,7 +21,7 @@ import { image } from '../@ohos.multimedia.image';
Describes the mission snapshot.
| Name| Type| Readable| Writable| Description|
| Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- |
| ability | ElementName | Yes| Yes| Information that matches an ability.|
| snapshot | [image.PixelMap](js-apis-image.md) | Yes| Yes| Snapshot of the mission.|
| ability | ElementName | Yes | Yes | Information that matches an ability. |
| snapshot | [image.PixelMap](js-apis-image.md) | Yes| Yes| Snapshot of the mission. |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册