diff --git a/en/application-dev/reference/apis/js-apis-featureAbility.md b/en/application-dev/reference/apis/js-apis-featureAbility.md index 49119078246995104a0e2d3fd5a401c7c93371d4..505e8cee17663326854d0e2c903a3bc682e9a2b1 100644 --- a/en/application-dev/reference/apis/js-apis-featureAbility.md +++ b/en/application-dev/reference/apis/js-apis-featureAbility.md @@ -16,12 +16,16 @@ startAbility(parameter: StartAbilityParameter, callback: AsyncCallback\) Starts an ability. This method uses a callback to return the result. +**System capabilities** + +SystemCapability.Ability.AbilityRuntime.FAModel + **Parameters** -| Name| Type| Mandatory| Description| +| Name | Type | Mandatory| Description | | --------- | --------------------- | ---- | ------------------- | -| parameter | [StartAbilityParameter](#startabilityparameter) | Yes| Ability to start.| -| callback | AsyncCallback\ | Yes| Callback used to return the result.| +| parameter | [StartAbilityParameter](#startabilityparameter) | Yes | Ability to start.| +| callback | AsyncCallback\ | Yes | Callback used to return the result. | **Example** @@ -53,11 +57,15 @@ startAbility(parameter: StartAbilityParameter): Promise\ Starts an ability. This method uses a promise to return the result. +**System capabilities** + +SystemCapability.Ability.AbilityRuntime.FAModel + **Parameters** -| Name| Type| Mandatory| Description| +| Name | Type | Mandatory| Description | | --------- | ----------------------------------------------- | ---- | --------------------- | -| parameter | [StartAbilityParameter](#startabilityparameter) | Yes| Ability to start.| +| parameter | [StartAbilityParameter](#startabilityparameter) | Yes | Ability to start.| **Example** @@ -89,15 +97,19 @@ acquireDataAbilityHelper(uri: string): DataAbilityHelper Obtains a **dataAbilityHelper** object. +**System capabilities** + +SystemCapability.Ability.AbilityRuntime.FAModel + **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type | Mandatory| Description | | ---- | ------ | ---- | ------------------------ | -| uri | string | Yes| URI of the file to open.| +| uri | string | Yes | URI of the file to open.| **Return value** -| Type| Description| +| Type | Description | | ----------------- | -------------------------------------------- | | DataAbilityHelper | A utility class used to help other abilities access the Data ability.| @@ -116,12 +128,16 @@ startAbilityForResult(parameter: StartAbilityParameter, callback: AsyncCallback\ Starts an ability. This method uses a callback to return the execution result when the ability is destroyed. +**System capabilities** + +SystemCapability.Ability.AbilityRuntime.FAModel + **Parameters** -| Name| Type| Mandatory| Description| +| Name | Type | Mandatory| Description | | --------- | ----------------------------------------------- | ---- | --------------------- | -| parameter | [StartAbilityParameter](#startabilityparameter) | Yes| Ability to start.| -| callback | AsyncCallback\<[AbilityResult](#abilityresult)> | Yes| Callback used to return the result.| +| parameter | [StartAbilityParameter](#startabilityparameter) | Yes | Ability to start.| +| callback | AsyncCallback\<[AbilityResult](#abilityresult)> | Yes | Callback used to return the result. | **Example** @@ -151,14 +167,18 @@ startAbilityForResult(parameter: StartAbilityParameter): Promise\ Starts an ability. This method uses a promise to return the execution result when the ability is destroyed. +**System capabilities** + +SystemCapability.Ability.AbilityRuntime.FAModel + **Parameters** -| Name| Type| Mandatory| Description| +| Name | Type | Mandatory| Description | | --------- | ----------------------------------------------- | ---- | ------------------- | -| parameter | [StartAbilityParameter](#startabilityparameter) | Yes| Ability to start.| +| parameter | [StartAbilityParameter](#startabilityparameter) | Yes | Ability to start.| **Return value** -| Type| Description| +| Type | Description | | ----------------------------------------- | -------------- | | Promise\<[AbilityResult](#abilityresult)> | Promised returned with the execution result.| @@ -204,12 +224,16 @@ terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback\ Destroys this Page ability, with the result code and data sent to the caller. This method uses a callback to return the result. +**System capabilities** + +SystemCapability.Ability.AbilityRuntime.FAModel + **Parameters** -| Name| Type| Mandatory| Description| +| Name | Type | Mandatory| Description | | --------- | ------------- | ---- | ------------------- | -| parameter | [AbilityResult](#abilityresult) | Yes| Ability to start.| -| callback | AsyncCallback\ | Yes| Callback used to return the result.| +| parameter | [AbilityResult](#abilityresult) | Yes | Ability to start.| +| callback | AsyncCallback\ | Yes | Callback used to return the result. | **Example** @@ -250,14 +274,18 @@ terminateSelfWithResult(parameter: AbilityResult): Promise\ Destroys this Page ability, with the result code and data sent to the caller. This method uses a promise to return the result. +**System capabilities** + +SystemCapability.Ability.AbilityRuntime.FAModel + **Parameters** -| Name| Type| Mandatory| Description| +| Name | Type | Mandatory| Description | | --------- | ------------------------------- | ---- | ------------------- | -| parameter | [AbilityResult](#abilityresult) | Yes| Ability to start.| +| parameter | [AbilityResult](#abilityresult) | Yes | Ability to start.| **Return value** -| Type| Description| +| Type | Description | | -------------- | ----------------------- | | Promise\ | Promise used to return the result.| @@ -304,11 +332,15 @@ hasWindowFocus(callback: AsyncCallback\): void Checks whether the main window of this ability has the focus. This method uses a callback to return the result. +**System capabilities** + +SystemCapability.Ability.AbilityRuntime.FAModel + **Parameters** -| Name| Type| Mandatory| Description| +| Name | Type | Mandatory| Description | | -------- | ----------------------- | ---- | ------------------------------------------------------------ | -| callback | AsyncCallback\ | Yes| Callback used to return the result.
Returns **true** if the main window of this ability has the focus; returns **false** otherwise.| +| callback | AsyncCallback\ | Yes | Callback used to return the result.
Returns **true** if the main window of this ability has the focus; returns **false** otherwise.| **Example** @@ -325,9 +357,13 @@ hasWindowFocus(): Promise\ Checks whether the main window of this ability has the focus. This method uses a promise to return the result. +**System capabilities** + +SystemCapability.Ability.AbilityRuntime.FAModel + **Return value** -| Type| Description| +| Type | Description | | ----------------- | ---------------------------------------------------------- | | Promise\ | Returns **true** if the main window of this ability has the focus; returns **false** otherwise.| @@ -348,11 +384,15 @@ getWant(callback: AsyncCallback\): void Obtains the **Want** object sent from this ability. This method uses a callback to return the result. +**System capabilities** + +SystemCapability.Ability.AbilityRuntime.FAModel + **Parameters** -| Name| Type| Mandatory| Description| +| Name | Type | Mandatory| Description | | -------- | ----------------------------- | ---- | ------------------ | -| callback | AsyncCallback\<[Want](#want)> | Yes| Callback used to return the result.| +| callback | AsyncCallback\<[Want](#want)> | Yes | Callback used to return the result.| **Example** @@ -369,8 +409,12 @@ getWant(): Promise\ Obtains the **Want** object sent from this ability. This method uses a promise to return the result. +**System capabilities** + +SystemCapability.Ability.AbilityRuntime.FAModel + **Return value** -| Type| Description| +| Type | Description | | ----------------------- | ------------------------- | | Promise\<[Want](#want)> | Promise used to return the result.| @@ -389,8 +433,12 @@ getContext(): Context Obtains the application context. +**System capabilities** + +SystemCapability.Ability.AbilityRuntime.FAModel + **Return value** -| Type| Description| +| Type | Description | | ------- | -------------------- | | Context | Application context returned.| @@ -410,11 +458,15 @@ terminateSelf(callback: AsyncCallback\): void Destroys this Page ability, with the result code and data sent to the caller. This method uses a callback to return the result. +**System capabilities** + +SystemCapability.Ability.AbilityRuntime.FAModel + **Parameters** -| Name| Type| Mandatory| Description| +| Name | Type | Mandatory| Description | | -------- | -------------------- | ---- | ---------------- | -| callback | AsyncCallback\ | Yes| Callback used to return the result.| +| callback | AsyncCallback\ | Yes | Callback used to return the result.| **Example** @@ -431,8 +483,12 @@ terminateSelf(): Promise\ Destroys this Page ability, with the result code and data sent to the caller. This method uses a promise to return the result. +**System capabilities** + +SystemCapability.Ability.AbilityRuntime.FAModel + **Return value** -| Type| Description| +| Type | Description | | -------------- | ------------------------- | | Promise\ | Promise used to return the result.| @@ -450,31 +506,35 @@ connectAbility(request: Want, options:ConnectOptions): number Connects this ability to a specific Service ability. This method uses a callback to return the result. +**System capabilities** + +SystemCapability.Ability.AbilityRuntime.FAModel + **Parameters** -| Name| Type| Mandatory| Description| +| Name | Type | Mandatory| Description | | ------- | -------------- | ---- | ---------------------------- | -| request | [Want](#want) | Yes| Service ability to connect.| -| options | ConnectOptions | Yes| Callback used to return the result.| +| request | [Want](#want) | Yes | Service ability to connect.| +| options | ConnectOptions | Yes | Callback used to return the result. | Want -| Name| Readable/Writable| Type| Mandatory| Description| +| Name | Readable/Writable | Type | Mandatory| Description | | ------------ | -------- | -------- | ---- | ---------------------------------- | -| deviceId | Read-only| string | No| Device ID of the Service ability to connect. The default value is the local device ID.| -| bundleName | Read-only| string | Yes| Bundle name of the Service ability to connect.| -| abilityName | Read-only| string | Yes| Class name of the Service ability to connect.| +| deviceId | Read-only | string | No | Device ID of the Service ability to connect. The default value is the local device ID.
System capabilities: SystemCapability.Ability.AbilityBase| +| bundleName | Read-only | string | Yes | Bundle name of the Service ability to connect.
System capabilities: SystemCapability.Ability.AbilityBase | +| abilityName | Read-only | string | Yes | Class name of the Service ability to connect.
System capabilities: SystemCapability.Ability.AbilityBase | ConnectOptions -| Name| Readable/Writable| Type| Mandatory| Description| +| Name | Readable/Writable| Type | Mandatory| Description | | ------------ | -------- | -------- | ---- | ---------------------------------- | -| onConnect | Read-only| function | Yes| Callback invoked when the connection is successful.| -| onDisconnect | Read-only| function | Yes| Callback invoked when the connection fails.| -| onFailed | Read-only| function | Yes| Callback invoked when **connectAbility** fails to be called.| +| onConnect | Read-only | function | Yes | Callback invoked when the connection is successful.
System capabilities: SystemCapability.Ability.AbilityRuntime.Core | +| onDisconnect | Read-only | function | Yes | Callback invoked when the connection fails.
System capabilities: SystemCapability.Ability.AbilityRuntime.Core | +| onFailed | Read-only | function | Yes | Callback invoked when **connectAbility** fails to be called.
System capabilities: SystemCapability.Ability.AbilityRuntime.Core| **Return value** -| Type| Description| +| Type | Description | | ------ | ------------------------ | | number | Returns the ID of the Service ability connected.| @@ -512,12 +572,16 @@ disconnectAbility(connection: number, callback:AsyncCallback\): void Disconnects this ability from a specific Service ability. This method uses a callback to return the result. +**System capabilities** + +SystemCapability.Ability.AbilityRuntime.FAModel + **Parameters** -| Name| Type| Mandatory| Description| +| Name | Type | Mandatory| Description | | ---------- | ------------- | ---- | ------------------------------ | -| connection | number | Yes| ID of the Service ability to disconnect.| -| callback | AsyncCallback\ | Yes| Callback used to return the result.| +| connection | number | Yes | ID of the Service ability to disconnect.| +| callback | AsyncCallback\ | Yes | Callback used to return the result. | **Example** @@ -557,14 +621,18 @@ disconnectAbility(connection: number): Promise\ Disconnects this ability from a specific Service ability. This method uses a promise to return the result. +**System capabilities** + +SystemCapability.Ability.AbilityRuntime.FAModel + **Parameters** -| Name| Type| Mandatory| Description| +| Name | Type | Mandatory| Description | | ---------- | ------ | ---- | ------------------------------ | -| connection | number | Yes| ID of the Service ability to disconnect.| +| connection | number | Yes | ID of the Service ability to disconnect.| **Return value** -| Type| Description| +| Type | Description | | -------------- | ----------------------- | | Promise\ | Promise used to return the result.| @@ -596,226 +664,51 @@ var connId = featureAbility.connectAbility( var result = await featureAbility.disconnectAbility(connId); ``` -## featureAbility.continueAbility - -continueAbility(options: ContinueAbilityOptions, callback: AsyncCallback\): void - -Migrates an ability to another device. This method uses a callback to return the execution result. - -**Parameters** - -| Name| Type| Mandatory| Description| -| -------- | ---------------------- | ---- | ------------------- | -| options | ContinueAbilityOptions | Yes| Ability to migrate.| -| callback | AsyncCallback\ | Yes| Callback used to return the result.| - -ContinueAbilityOptions - -| Name| Readable/Writable| Type| Mandatory| Description| -| ---------- | -------- | ------- | ---- | ------------------------------------------------------------ | -| deviceId | Read-only| string | Yes| Information about the ability to migrate.| -| reversible | Read-only| boolean | Yes| Whether migration back is supported. Currently, this feature is not supported. This parameter is reserved and can be set to **false**.| - -**Example** - -```javascript -import device from '@system.device' -import ability from '@ohos.ability.featureability' - -var DEVICE_LIST_LOCALHOST -export default { - data: { - title: "", - deviceId: '', - deviceList: [], - remoteDeviceModel : new RemoteDeviceModel() - }, - onInit() { - DEVICE_LIST_LOCALHOST = { - id: 'localhost', - }; - this.deviceList = [DEVICE_LIST_LOCALHOST]; - }, - onShow() { - const core = Core.getInstance() - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }) - const reportExtend = new ReportExtend(file) - core.addService('expect', expectExtend) - core.addService('report', reportExtend) - core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) - core.execute() - }, - onReady() { - }, - GetNetWorkId(){ - let self = this; - this.remoteDeviceModel.registerDeviceListCallback(() => { - var list = []; - list[0] = DEVICE_LIST_LOCALHOST; - var deviceList = self.remoteDeviceModel.deviceList; - for (var i = 0; i < deviceList.length; i++) { - list[i] = { - id: deviceList[i].deviceId, - }; - } - self.deviceList = list; - }); - }, - ShowNetWorkId(){ - this.deviceId = this.deviceList[0].id; - }, - - async ContinueAbility(){ - function ContinueAbilityCallback(err) { - console.info("=============>ContinueAbilityCallback============>"); - } - var continueAbilityOptions = { - reversible: false, - deviceId: this.deviceId, - } - //continueAbility callback - await ability.continueAbility(continueAbilityOptions, ContinueAbilityCallback); - }, -} -``` - -## featureAbility.continueAbility - -continueAbility(options: ContinueAbilityOptions): Promise\; - -Migrates an ability to another device. This method uses a promise to return the execution result. - -**Parameters** - -| Name| Type| Mandatory| Description| -| ------- | ---------------------- | ---- | ------------------- | -| options | ContinueAbilityOptions | Yes| Ability to migrate.| - -ContinueAbilityOptions - -| Name| Readable/Writable| Type| Mandatory| Description| -| ---------- | -------- | ------- | ---- | ------------------------------------------------------------ | -| deviceId | Read-only| string | Yes| Information about the ability to migrate.| -| reversible | Read-only| boolean | Yes| Whether migration back is supported. Currently, this feature is not supported. This parameter is reserved and can be set to **false**.| - -**Example** - -```javascript -import device from '@system.device' -import ability from '@ohos.ability.featureability' - -var DEVICE_LIST_LOCALHOST -export default { - data: { - title: "", - deviceId: '', - deviceList: [], - remoteDeviceModel : new RemoteDeviceModel() - }, - onInit() { - DEVICE_LIST_LOCALHOST = { - id: 'localhost', - }; - this.deviceList = [DEVICE_LIST_LOCALHOST]; - }, - onShow() { - const core = Core.getInstance() - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }) - const reportExtend = new ReportExtend(file) - core.addService('expect', expectExtend) - core.addService('report', reportExtend) - core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) - core.execute() - }, - onReady() { - }, - GetNetWorkId(){ - let self = this; - this.remoteDeviceModel.registerDeviceListCallback(() => { - var list = []; - list[0] = DEVICE_LIST_LOCALHOST; - var deviceList = self.remoteDeviceModel.deviceList; - for (var i = 0; i < deviceList.length; i++) { - list[i] = { - id: deviceList[i].deviceId, - }; - } - self.deviceList = list; - }); - }, - ShowNetWorkId(){ - this.deviceId = this.deviceList[0].id; - }, - - async ContinueAbility(){ - function ContinueAbilityCallback(err) { - console.info("=============>ContinueAbilityCallback============>"); - } - var continueAbilityOptions = { - reversible: false, - deviceId: this.deviceId, - } - //continueAbility promise - await ability.continueAbility(continueAbilityOptions).then(() => { - console.info("=======>continueAbilityCallback=========>"); - }); - }, -} -``` - ## AbilityResult -| Name| Readable/Writable| Type| Mandatory| Description| +| Name | Readable/Writable| Type | Mandatory| Description | | ---------- | -------- | --------------------- | ---- | ------------------------------------------------------------ | -| resultCode | Read-only| number | Yes| Result code returned after the ability is destroyed. The feature for defining error-specific result codes is coming soon.| -| want | Read-only| [Want](#want) | No| Data returned after the ability is destroyed. You can define the data to be returned. This parameter can be **null**.| +| resultCode | Read-only | number | Yes | Result code returned after the ability is destroyed. The feature for defining error-specific result codes is coming soon.
System capabilities: SystemCapability.Ability.AbilityBase| +| want | Read-only | [Want](#want) | No | Data returned after the ability is destroyed. You can define the data to be returned. This parameter can be **null**.
System capabilities: SystemCapability.Ability.AbilityBase | ## StartAbilityParameter -| Name| Readable/Writable| Type| Mandatory| Description| +| Name | Readable/Writable| Type | Mandatory| Description | | ------------------- | -------- | -------------------- | ---- | ------------------------------------------------------------ | -| want | Read-only| [Want](#want) | Yes| Information about the ability to start.| -| abilityStartSetting | Read-only| {[key: string]: any} | No| Special attribute of the ability to start. This attribute can be passed in the method call.| +| want | Read-only | [Want](#want) | Yes | Information about the ability to start.
System capabilities: SystemCapability.Ability.AbilityRuntime.FAModel | +| abilityStartSetting | Read-only | {[key: string]: any} | No | Special attribute of the ability to start. This attribute can be passed in the method call.
System capabilities: SystemCapability.Ability.AbilityRuntime.FAModel| ## Want -| Name| Readable/Writable| Type| Mandatory| Description| +| Name | Readable/Writable| Type | Mandatory| Description | | ----------- | -------- | -------------------- | ---- | ------------------------------------------------------------ | -| deviceId | Read-only| string | No| ID of the device that runs the ability.| -| bundleName | Read-only| string | No| Bundle name of the ability to start. If both **bundleName** and **abilityName** are specified in a **Want** object, the **Want** object can directly match the specified ability.| -| abilityName | Read-only| string | No| Name of the ability to start. If both **bundleName** and **abilityName** are specified in a **Want** object, the **Want** object can directly match the specified ability.| -| uri | Read-only| string | No| URI information to match. If **uri** is specified in a **Want** object, the **Want** object will match the specified URI information, including **scheme**, **schemeSpecificPart**, **authority**, and **path**.| -| type | Read-only| string | No| MIME type, for example, text/plain or image/*.| -| flags | Read-only| number | No| How the **Want** object will be handled. By default, a number is passed. For details, see [flags](#flags).| -| action | Read-only| string | No| Action option.| -| parameters | Read-only| {[key: string]: any} | No| List of parameters in a **Want** object.| -| entities | Read-only| Array\ | No| List of entities.| +| deviceId | Read-only | string | No | ID of the device that runs the ability.
System capabilities: SystemCapability.Ability.AbilityBase | +| bundleName | Read-only | string | No | Bundle name of the ability to start. If both **bundleName** and **abilityName** are specified in a **Want** object, the **Want** object can directly match the specified ability.
System capabilities: SystemCapability.Ability.AbilityBase| +| abilityName | Read-only | string | No | Name of the ability to start. If both **bundleName** and **abilityName** are specified in a **Want** object, the **Want** object can directly match the specified ability.
System capabilities: SystemCapability.Ability.AbilityBase| +| uri | Read-only | string | No | URI information to match. If **uri** is specified in a **Want** object, the **Want** object will match the specified URI information, including **scheme**, **schemeSpecificPart**, **authority**, and **path**.
System capabilities: SystemCapability.Ability.AbilityBase| +| type | Read-only | string | No | MIME type, for example, text/plain or image/*.
System capabilities: SystemCapability.Ability.AbilityBase | +| flags | Read-only | number | No | How the **Want** object will be handled. By default, a number is passed. For details, see [flags](#flags).
System capabilities: SystemCapability.Ability.AbilityBase| +| action | Read-only | string | No | Action option.
System capabilities: SystemCapability.Ability.AbilityBase | +| parameters | Read-only | {[key: string]: any} | No | List of parameters in a **Want** object.
System capabilities: SystemCapability.Ability.AbilityBase | +| entities | Read-only | Array\ | No | List of entities.
System capabilities: SystemCapability.Ability.AbilityBase | ## flags -| Name| Name| Description| +| Name | Name | Description | | ------------------------------------ | ---------- | ------------------------------------------------------------ | -| FLAG_AUTH_READ_URI_PERMISSION | 0x00000001 | Indicates the permission to read the URI.| -| FLAG_AUTH_WRITE_URI_PERMISSION | 0x00000002 | Indicates the permission to write the URI.| -| FLAG_ABILITY_FORWARD_RESULT | 0x00000004 | Returns the result to the ability.| -| FLAG_ABILITY_CONTINUATION | 0x00000008 | Indicates whether the ability on the local device can be migrated to a remote device.| -| FLAG_NOT_OHOS_COMPONENT | 0x00000010 | Indicates that a component does not belong to OHOS.| -| FLAG_ABILITY_FORM_ENABLED | 0x00000020 | Indicates whether to enable an ability.| -| FLAG_AUTH_PERSISTABLE_URI_PERMISSION | 0x00000040 | Indicates the permission to make the URI persistent.| -| FLAG_AUTH_PREFIX_URI_PERMISSION | 0x00000080 | Indicates the permission to verify URIs by prefix matching.| -| FLAG_ABILITYSLICE_MULTI_DEVICE | 0x00000100 | Supports cross-device startup in a distributed scheduler.| -| FLAG_START_FOREGROUND_ABILITY | 0x00000200 | Indicates that the Service ability is started regardless of whether the host application has been started.| -| FLAG_ABILITY_CONTINUATION_REVERSIBLE | 0x00000400 | Indicates that the migration is reversible.| -| FLAG_INSTALL_ON_DEMAND | 0x00000800 | Indicates that the specific ability will be installed if it has not been installed.| -| FLAG_INSTALL_WITH_BACKGROUND_MODE | 0x80000000 | Indicates that the specific ability will be installed in the background if it has not been installed.| -| FLAG_ABILITY_CLEAR_MISSION | 0x00008000 | Clears other operation missions. This flag can be set for the **Want** object passed to **ohos.app.Context#startAbility** and must be used together with **flag_ABILITY_NEW_MISSION**.| -| FLAG_ABILITY_NEW_MISSION | 0x10000000 | Creates a mission on the historical mission stack.| -| FLAG_ABILITY_MISSION_TOP | 0x20000000 | Starts the mission on the top of the existing mission stack; creates an ability instance if no mission exists.| +| FLAG_AUTH_READ_URI_PERMISSION | 0x00000001 | Indicates the permission to read the URI.
System capabilities: SystemCapability.Ability.AbilityBase | +| FLAG_AUTH_WRITE_URI_PERMISSION | 0x00000002 | Indicates the permission to write the URI.
System capabilities: SystemCapability.Ability.AbilityBase | +| FLAG_ABILITY_FORWARD_RESULT | 0x00000004 | Returns the result to the ability.
System capabilities: SystemCapability.Ability.AbilityBase | +| FLAG_ABILITY_CONTINUATION | 0x00000008 | Indicates whether the ability on the local device can be migrated to a remote device.
System capabilities: SystemCapability.Ability.AbilityBase | +| FLAG_NOT_OHOS_COMPONENT | 0x00000010 | Indicates that a component does not belong to OHOS.
System capabilities: SystemCapability.Ability.AbilityBase | +| FLAG_ABILITY_FORM_ENABLED | 0x00000020 | Indicates whether to enable an ability.
System capabilities: SystemCapability.Ability.AbilityBase | +| FLAG_AUTH_PERSISTABLE_URI_PERMISSION | 0x00000040 | Indicates the permission to make the URI persistent.
System capabilities: SystemCapability.Ability.AbilityBase | +| FLAG_AUTH_PREFIX_URI_PERMISSION | 0x00000080 | Indicates the permission to verify URIs by prefix matching.
System capabilities: SystemCapability.Ability.AbilityBase | +| FLAG_ABILITYSLICE_MULTI_DEVICE | 0x00000100 | Supports cross-device startup in a distributed scheduler.
System capabilities: SystemCapability.Ability.AbilityBase | +| FLAG_START_FOREGROUND_ABILITY | 0x00000200 | Indicates that the Service ability is started regardless of whether the host application has been started.
System capabilities: SystemCapability.Ability.AbilityBase | +| FLAG_ABILITY_CONTINUATION_REVERSIBLE | 0x00000400 | Indicates that the migration is reversible.
System capabilities: SystemCapability.Ability.AbilityBase | +| FLAG_INSTALL_ON_DEMAND | 0x00000800 | Indicates that the specific ability will be installed if it has not been installed.
System capabilities: SystemCapability.Ability.AbilityBase | +| FLAG_INSTALL_WITH_BACKGROUND_MODE | 0x80000000 | Indicates that the specific ability will be installed in the background if it has not been installed.
System capabilities: SystemCapability.Ability.AbilityBase | +| FLAG_ABILITY_CLEAR_MISSION | 0x00008000 | Clears other operation missions. This flag can be set for the **Want** object passed to **ohos.app.Context#startAbility** and must be used together with **flag_ABILITY_NEW_MISSION**.
System capabilities: SystemCapability.Ability.AbilityBase| +| FLAG_ABILITY_NEW_MISSION | 0x10000000 | Creates a mission on the historical mission stack.
System capabilities: SystemCapability.Ability.AbilityBase | +| FLAG_ABILITY_MISSION_TOP | 0x20000000 | Starts the mission on the top of the existing mission stack; creates an ability instance if no mission exists.
System capabilities: SystemCapability.Ability.AbilityBase|