diff --git a/en/application-dev/reference/apis/js-apis-application-MissionSnapshot.md b/en/application-dev/reference/apis/js-apis-application-MissionSnapshot.md index 4521fcd2b0158e67b20d36ac059cea5642a28179..c850915c4d2743d7ee8f03ce0b96d6a4f7739525 100644 --- a/en/application-dev/reference/apis/js-apis-application-MissionSnapshot.md +++ b/en/application-dev/reference/apis/js-apis-application-MissionSnapshot.md @@ -1,6 +1,5 @@ # MissionSnapshot - > **NOTE** > > 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. @@ -10,7 +9,7 @@ Provides the snapshot of a mission. ## Modules to Import ``` -import abilitymanager from '@ohos.application.abilityManager'; +import missionManager from '@ohos.application.missionManager' import ElementName from '@ohos.bundle'; import image from '@ohos.multimedia.image'; ``` diff --git a/en/application-dev/reference/apis/js-apis-application-context.md b/en/application-dev/reference/apis/js-apis-application-context.md index 38ceb059efc27760cefb03b1c04fdd66a4f614e3..66cd6b7150041bdbf45d4d0e0adf105e0ade044b 100644 --- a/en/application-dev/reference/apis/js-apis-application-context.md +++ b/en/application-dev/reference/apis/js-apis-application-context.md @@ -1,8 +1,9 @@ # Context -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
-> 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. - +> **NOTE** +> +> 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. +> The APIs of this module can be used only in the stage model. Provides the context for running code, including **applicationInfo** and **resourceManager**. @@ -19,43 +20,43 @@ You must extend **AbilityContext** to implement this module. **System capability**: SystemCapability.Ability.AbilityRuntime.Core - | Name| Type| Readable| Writable| Description| + | Name| Type| Readable| Writable| Description| | -------- | -------- | -------- | -------- | -------- | -| resourceManager | ResourceManager | Yes| No| **ResourceManager** object.| -| applicationInfo | ApplicationInfo | Yes| No| Information about the application.| -| cacheDir | string | Yes| No| Cache directory of the application on the internal storage.| -| tempDir | string | Yes| No| Temporary file directory of the application.| -| filesDir | string | Yes| No| File directory of the application on the internal storage.| -| databaseDir | string | Yes| No| Storage directory of local data.| -| storageDir | string | Yes| No| Storage directory of lightweight data.| -| bundleCodeDir | string | Yes| No| Application installation path.| -| distributedFilesDir | string | Yes| No| Storage directory of distributed application data files.| -| eventHub | [EventHub](js-apis-eventhub.md) | Yes| No| Event hub information.| -| area | [AreaMode](#areamode) | Yes| Yes| Area in which the file to be access is located.| +| resourceManager | ResourceManager | Yes| No| **ResourceManager** object.| +| applicationInfo | ApplicationInfo | Yes| No| Information about the application.| +| cacheDir | string | Yes| No| Cache directory of the application on the internal storage.| +| tempDir | string | Yes| No| Temporary file directory of the application.| +| filesDir | string | Yes| No| File directory of the application on the internal storage.| +| databaseDir | string | Yes| No| Storage directory of local data.| +| storageDir | string | Yes| No| Storage directory of lightweight data.| +| bundleCodeDir | string | Yes| No| Application installation path.| +| distributedFilesDir | string | Yes| No| Storage directory of distributed application data files.| +| eventHub | [EventHub](js-apis-eventhub.md) | Yes| No| Event hub information.| +| area | [AreaMode](#areamode) | Yes| Yes| Area in which the file to be access is located.| ## Context.createBundleContext createBundleContext(bundleName: string): Context; -Creates an application context. +Creates a context for a given application. **System capability**: SystemCapability.Ability.AbilityRuntime.Core **Parameters** - | Name| Type| Mandatory| Description| + | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | bundleName | string | Yes| Application bundle name.| + | bundleName | string | Yes| Application bundle name.| **Return value** - | Type| Description| + | Type| Description| | -------- | -------- | - | Context | Context of the application created.| + | Context | Context created.| **Example** - + ```js import AbilityContext from '@ohos.application.Ability' class MainAbility extends AbilityContext { @@ -68,6 +69,76 @@ Creates an application context. ``` +## Context.createModuleContext + +createModuleContext(moduleName: string): Context; + +Creates a context for a given HAP. + +**System capability**: SystemCapability.Ability.AbilityRuntime.Core + +**Parameters** + + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | moduleName | string | Yes| HAP name in the application.| + +**Return value** + + | Type| Description| + | -------- | -------- | + | Context | Context created.| + +**Example** + + ```js + import AbilityContext from '@ohos.application.Ability' + class MainAbility extends AbilityContext { + onWindowStageCreate(windowStage) { + let moduleName = "module"; + let context = this.context.createModuleContext(moduleName); + } +} + + ``` + + +## Context.createModuleContext + +createModuleContext(bundleName: string, moduleName: string): Context; + +Creates a context for a given HAP in an application. + +**System capability**: SystemCapability.Ability.AbilityRuntime.Core + +**Parameters** + + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | bundleName | string | Yes| Application bundle name.| + | moduleName | string | Yes| HAP name in the application.| + +**Return value** + + | Type| Description| + | -------- | -------- | + | Context | Context created.| + +**Example** + + ```js + import AbilityContext from '@ohos.application.Ability' + class MainAbility extends AbilityContext { + onWindowStageCreate(windowStage) { + let bundleName = "com.example.bundle"; + let moduleName = "module"; + let context = this.context.createModuleContext(bundleName, moduleName); + } +} + + ``` + + ## Context.getApplicationContext getApplicationContext(): ApplicationContext; @@ -83,7 +154,7 @@ Obtains the context of this application. | ApplicationContext | Current application context.| **Example** - + ```js // This part is mandatory. let applicationContext = this.context.getApplicationContext(); diff --git a/en/application-dev/reference/apis/js-apis-eventhub.md b/en/application-dev/reference/apis/js-apis-eventhub.md index f2d605b94821c591812c73bbb10defa04a6a40e1..a5a25efdbab5c977e92b85a5fcc656f5c3ae3ef7 100644 --- a/en/application-dev/reference/apis/js-apis-eventhub.md +++ b/en/application-dev/reference/apis/js-apis-eventhub.md @@ -1,8 +1,9 @@ # EventHub -> **NOTE**
-> The initial APIs of this module are supported since API 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. - +> **NOTE** +> +> The initial APIs of this module are supported since API 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. +> The APIs of this module can be used only in the stage model. Implements event subscription, unsubscription, and triggering. @@ -14,11 +15,8 @@ import Ability from '@ohos.application.Ability' ## Usage - ​Before using any APIs in the **EventHub**, you must obtain an **EventHub** instance through the member variable **context** of the **Ability** instance. - - ```js import Ability from '@ohos.application.Ability' export default class MainAbility extends Ability { diff --git a/en/application-dev/reference/apis/js-apis-extensionrunninginfo.md b/en/application-dev/reference/apis/js-apis-extensionrunninginfo.md index 05a2fb5bdfda8d4f86e0283b7d9abdeeee2e2f22..62f6d9b631aa687e61fc6a1b4fe26fb72f16f105 100644 --- a/en/application-dev/reference/apis/js-apis-extensionrunninginfo.md +++ b/en/application-dev/reference/apis/js-apis-extensionrunninginfo.md @@ -1,9 +1,9 @@ # ExtensionRunningInfo -> **NOTE**
+> **NOTE** +> > 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. - Provides extension running information. ## Modules to Import @@ -14,11 +14,8 @@ import abilitymanager from '@ohos.application.abilityManager'; ## Usage - The extension running information is obtained through an **abilityManager** instance. - - ```js import abilitymanager from '@ohos.application.abilityManager'; let upperLimit=1 diff --git a/en/application-dev/reference/apis/js-apis-featureAbility.md b/en/application-dev/reference/apis/js-apis-featureAbility.md index 9ec94e3742fd02c72880475bb2fc59c34f296a14..4c15fefc458a174ee0477d23b77aa9796f2bb051 100644 --- a/en/application-dev/reference/apis/js-apis-featureAbility.md +++ b/en/application-dev/reference/apis/js-apis-featureAbility.md @@ -1,7 +1,9 @@ -# FeatureAbility Module (JavaScript) +# FeatureAbility -> **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** +> +> 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. +> The APIs of this module can be used only in the FA model. ## Constraints @@ -923,7 +925,7 @@ Enumerates operation types of the Data ability. **System capability**: SystemCapability.Ability.AbilityBase -| Name | Value | Description | +| Name | Value | 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. | diff --git a/en/application-dev/reference/apis/js-apis-formbindingdata.md b/en/application-dev/reference/apis/js-apis-formbindingdata.md index 5f92677ec4a9856d96bc78b8787059ad5fb180ac..622f78b73e55afbe4fdcf8b342597b3ba44edeeb 100644 --- a/en/application-dev/reference/apis/js-apis-formbindingdata.md +++ b/en/application-dev/reference/apis/js-apis-formbindingdata.md @@ -1,6 +1,7 @@ # FormBindingData -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** +> **NOTE** +> > 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 @@ -38,12 +39,20 @@ Creates a **FormBindingData** object. **Example** ```js - let fd = fileio.openSync(path); - let obj = { - "temperature": "21°", - "formImages": {"image": fd} - }; - let formBindingDataObj = formBindingData.createFormBindingData(obj); + import featureAbility from '@ohos.ability.featureAbility'; + import fileio from '@ohos.fileio'; + let context=featureAbility.getContext(); + context.getOrCreateLocalDir((err,data)=>{ + let path=data+"/xxx.jpg"; + let fd = fileio.openSync(path); + let obj = { + "temperature": "21°", + "formImages": {"image": fd} + }; + let formBindingDataObj = formBindingData.createFormBindingData(obj); + }) + + ``` ## Attributes diff --git a/en/application-dev/reference/apis/js-apis-formextension.md b/en/application-dev/reference/apis/js-apis-formextension.md index 87660f087b82eca3e1a3e16538be564d94ed8dd9..b758b2f8e46d2bc4df93d94546f36c0caff4c960 100644 --- a/en/application-dev/reference/apis/js-apis-formextension.md +++ b/en/application-dev/reference/apis/js-apis-formextension.md @@ -1,7 +1,9 @@ # FormExtension -> **NOTE**
-> 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. +> **NOTE** +> +> 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. +> The APIs of this module can be used only in the stage model. Provides **FormExtension** APIs. diff --git a/en/application-dev/reference/apis/js-apis-formextensioncontext.md b/en/application-dev/reference/apis/js-apis-formextensioncontext.md index ac5149428ef10806dbc67e9a17c4b108ad3cf174..4e877102c65aaf630ee5d5e12eff7d3c9e611b42 100644 --- a/en/application-dev/reference/apis/js-apis-formextensioncontext.md +++ b/en/application-dev/reference/apis/js-apis-formextensioncontext.md @@ -1,7 +1,9 @@ # FormExtensionContext -> **NOTE**
-> 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. +> **NOTE** +> +> 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. +> The APIs of this module can be used only in the stage model. Implements the context that provides the capabilities and APIs of **FormExtension**. This class is inherited from **ExtensionContext**. @@ -21,11 +23,11 @@ Updates a widget. This method uses a callback to return the result. **Parameters** -| Name | Type | Mandatory| Description | -| --------------- | ------------------------------------------------------------ | ---- | -------------------------------------- | -| formId | string | Yes | ID of the widget that requests to be updated. | -| formBindingData | [formBindingData.FormBindingData](js-apis-formbindingdata.md#formbindingdata) | Yes | New data of the widget. | -| callback | AsyncCallback\ | Yes | Callback used to return the result indicating whether the method is successfully called.| + | Name | Type | Mandatory| Description | + | --------------- | ------------------------------------------------------------ | ---- | -------------------------------------- | + | formId | string | Yes | ID of the widget that requests to be updated. | + | formBindingData | [formBindingData.FormBindingData](js-apis-formbindingdata.md#formbindingdata) | Yes | New data of the widget. | + | callback | AsyncCallback\ | Yes | Callback used to return the result indicating whether the method is successfully called.| **Example** @@ -54,16 +56,16 @@ Updates a widget. This method uses a promise to return the result. **Parameters** -| Name | Type | Mandatory| Description | -| --------------- | ------------------------------------------------------------ | ---- | ------------------ | -| formId | string | Yes | ID of the widget that requests to be updated.| -| formBindingData | [formBindingData.FormBindingData](js-apis-formbindingdata.md#formbindingdata) | Yes | New data of the widget. | + | Name | Type | Mandatory| Description | + | --------------- | ------------------------------------------------------------ | ---- | ------------------ | + | formId | string | Yes | ID of the widget that requests to be updated.| + | formBindingData | [formBindingData.FormBindingData](js-apis-formbindingdata.md#formbindingdata) | Yes | New data of the widget. | **Return value** -| Type | Description | -| -------------- | --------------------------------- | -| Promise\ | Promise returned with the result indicating whether the method is successfully called.| + | Type | Description | + | -------------- | --------------------------------- | + | Promise\ | Promise returned with the result indicating whether the method is successfully called.| **Example** diff --git a/en/application-dev/reference/apis/js-apis-formhost.md b/en/application-dev/reference/apis/js-apis-formhost.md index 5c012bf525f59b08454fd7aa0886a5a0ed419d0e..91ea521d2bcdece8aa8b3f7b4fc7c278db4c2ba1 100644 --- a/en/application-dev/reference/apis/js-apis-formhost.md +++ b/en/application-dev/reference/apis/js-apis-formhost.md @@ -1,6 +1,7 @@ # FormHost -> **NOTE**
+> **NOTE** +> > 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. Provides APIs related to the widget host. diff --git a/en/application-dev/reference/apis/js-apis-missionManager.md b/en/application-dev/reference/apis/js-apis-missionManager.md index 75c79e3af3da6181c1a81f374cdd3730e95a4191..314d2f63cca7d6139a941ca82a1e723a496f0613 100644 --- a/en/application-dev/reference/apis/js-apis-missionManager.md +++ b/en/application-dev/reference/apis/js-apis-missionManager.md @@ -1,7 +1,8 @@ # missionManager -> **NOTE**
+> **NOTE** +> > 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. missionManager provides APIs to lock, unlock, and clear missions, and switch a mission to the foreground. @@ -26,15 +27,15 @@ Registers a listener to observe the mission status. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| listener | MissionListener | Yes| Listener to register.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | listener | MissionListener | Yes| Listener to register.| **Return value** -| Type| Description| -| -------- | -------- | -| number | Returns the unique index of the mission status listener, which is created by the system and allocated when the listener is registered.| + | Type| Description| + | -------- | -------- | + | number | Returns the unique index of the mission status listener, which is created by the system and allocated when the listener is registered.| **Example** @@ -62,10 +63,10 @@ Deregisters a mission status listener. This API uses an asynchronous callback to **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| listenerId | number | Yes| Unique index of the mission status listener to unregister. It is returned by **registerMissionListener**.| -| callback | AsyncCallback<void> | Yes| Callback used to return the result.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | listenerId | number | Yes| Unique index of the mission status listener to unregister. It is returned by **registerMissionListener**.| + | callback | AsyncCallback<void> | Yes| Callback used to return the result.| **Example** @@ -96,15 +97,15 @@ Deregisters a mission status listener. This API uses a promise to return the res **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| listenerId | number | Yes| Unique index of the mission status listener to unregister. It is returned by **registerMissionListener**.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | listenerId | number | Yes| Unique index of the mission status listener to unregister. It is returned by **registerMissionListener**.| **Return value** -| Type| Description| -| -------- | -------- | -| Promise<void> | Promise used to return the result.| + | Type| Description| + | -------- | -------- | + | Promise<void> | Promise used to return the result.| **Example** @@ -135,11 +136,11 @@ Obtains the information about a given mission. This API uses an asynchronous cal **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| deviceId | string | Yes| Device ID. It is a null string by default for the local device.| -| missionId | number | Yes| Mission ID.| -| callback | AsyncCallback<[MissionInfo](#missioninfo)> | Yes| Callback used to return the mission information obtained.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | deviceId | string | Yes| Device ID. It is a null string by default for the local device.| + | missionId | number | Yes| Mission ID.| + | callback | AsyncCallback<[MissionInfo](#missioninfo)> | Yes| Callback used to return the mission information obtained.| **Example** @@ -169,16 +170,16 @@ Obtains the information about a given mission. This API uses a promise to return **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| deviceId | string | Yes| Device ID. It is a null string by default for the local device.| -| missionId | number | Yes| Mission ID.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | deviceId | string | Yes| Device ID. It is a null string by default for the local device.| + | missionId | number | Yes| Mission ID.| **Return value** -| Type| Description| -| -------- | -------- | -| Promise<[MissionInfo](#missioninfo)> | Promise used to return the mission information obtained.| + | Type| Description| + | -------- | -------- | + | Promise<[MissionInfo](#missioninfo)> | Promise used to return the mission information obtained.| **Example** @@ -201,11 +202,11 @@ Obtains information about all missions. This API uses an asynchronous callback t **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| deviceId | string | Yes| Device ID. It is a null string by default for the local device.| -| numMax | number | Yes| Maximum number of missions whose information can be obtained.| -| callback | AsyncCallback<Array<[MissionInfo](#missioninfo)>> | Yes| Callback used to return the array of mission information obtained.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | deviceId | string | Yes| Device ID. It is a null string by default for the local device.| + | numMax | number | Yes| Maximum number of missions whose information can be obtained.| + | callback | AsyncCallback<Array<[MissionInfo](#missioninfo)>> | Yes| Callback used to return the array of mission information obtained.| **Example** @@ -230,16 +231,16 @@ Obtains information about all missions. This API uses a promise to return the re **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| deviceId | string | Yes| Device ID. It is a null string by default for the local device.| -| numMax | number | Yes| Maximum number of missions whose information can be obtained.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | deviceId | string | Yes| Device ID. It is a null string by default for the local device.| + | numMax | number | Yes| Maximum number of missions whose information can be obtained.| **Return value** -| Type| Description| -| -------- | -------- | -| Promise<Array<[MissionInfo](#missioninfo)>> | Promise used to return the array of mission information obtained.| + | Type| Description| + | -------- | -------- | + | Promise<Array<[MissionInfo](#missioninfo)>> | Promise used to return the array of mission information obtained.| **Example** @@ -262,11 +263,11 @@ Obtains the snapshot of a given mission. This API uses an asynchronous callback **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| deviceId | string | Yes| Device ID. It is a null string by default for the local device.| -| missionId | number | Yes| Mission ID.| -| callback | AsyncCallback<[MissionSnapshot](js-apis-application-MissionSnapshot.md)> | Yes| Callback used to return the snapshot information obtained.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | deviceId | string | Yes| Device ID. It is a null string by default for the local device.| + | missionId | number | Yes| Mission ID.| + | callback | AsyncCallback<[MissionSnapshot](js-apis-application-MissionSnapshot.md)> | Yes| Callback used to return the snapshot information obtained.| **Example** @@ -297,16 +298,16 @@ Obtains the snapshot of a given mission. This API uses a promise to return the r **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| deviceId | string | Yes| Device ID. It is a null string by default for the local device.| -| missionId | number | Yes| Mission ID.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | deviceId | string | Yes| Device ID. It is a null string by default for the local device.| + | missionId | number | Yes| Mission ID.| **Return value** -| Type| Description| -| -------- | -------- | -| Promise<[MissionSnapshot](js-apis-application-MissionSnapshot.md)> | Promise used to return the snapshot information obtained.| + | Type| Description| + | -------- | -------- | + | Promise<[MissionSnapshot](js-apis-application-MissionSnapshot.md)> | Promise used to return the snapshot information obtained.| **Example** @@ -337,10 +338,10 @@ Locks a given mission. This API uses an asynchronous callback to return the resu **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| missionId | number | Yes| Mission ID.| -| callback | AsyncCallback<void> | Yes| Callback used to return the result.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | missionId | number | Yes| Mission ID.| + | callback | AsyncCallback<void> | Yes| Callback used to return the result.| **Example** @@ -370,15 +371,15 @@ Locks a given mission. This API uses a promise to return the result. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| missionId | number | Yes| Mission ID.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | missionId | number | Yes| Mission ID.| **Return value** -| Type| Description| -| -------- | -------- | -| Promise<void> | Promise used to return the result.| + | Type| Description| + | -------- | -------- | + | Promise<void> | Promise used to return the result.| **Example** @@ -441,15 +442,15 @@ Unlocks a given mission. This API uses a promise to return the result. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| missionId | number | Yes| Mission ID.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | missionId | number | Yes| Mission ID.| **Return value** -| Type| Description| -| -------- | -------- | -| Promise<void> | Promise used to return the result.| + | Type| Description| + | -------- | -------- | + | Promise<void> | Promise used to return the result.| **Example** @@ -483,10 +484,10 @@ Clears a given mission, regardless of whether it is locked. This API uses an asy **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| missionId | number | Yes| Mission ID.| -| callback | AsyncCallback<void> | Yes| Callback used to return the result.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | missionId | number | Yes| Mission ID.| + | callback | AsyncCallback<void> | Yes| Callback used to return the result.| **Example** @@ -516,15 +517,15 @@ Clears a given mission, regardless of whether it is locked. This API uses a prom **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| missionId | number | Yes| Mission ID.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | missionId | number | Yes| Mission ID.| **Return value** -| Type| Description| -| -------- | -------- | -| Promise<void> | Promise used to return the result.| + | Type| Description| + | -------- | -------- | + | Promise<void> | Promise used to return the result.| **Example** @@ -574,9 +575,9 @@ Clears all unlocked missions. This API uses a promise to return the result. **Return value** -| Type| Description| -| -------- | -------- | -| Promise<void> | Promise used to return the result.| + | Type| Description| + | -------- | -------- | + | Promise<void> | Promise used to return the result.| **Example** @@ -598,10 +599,10 @@ Switches a given mission to the foreground. This API uses an asynchronous callba **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| missionId | number | Yes| Mission ID.| -| callback | AsyncCallback<void> | Yes| Callback used to return the result.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | missionId | number | Yes| Mission ID.| + | callback | AsyncCallback<void> | Yes| Callback used to return the result.| **Example** @@ -631,11 +632,11 @@ Switches a given mission to the foreground, with the startup parameters for the **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| missionId | number | Yes| Mission ID.| -| options | StartOptions | Yes| Startup parameters, which are used to specify the window mode and device ID for switching the mission to the foreground.| -| callback | AsyncCallback<void> | Yes| Callback used to return the result.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | missionId | number | Yes| Mission ID.| + | options | StartOptions | Yes| Startup parameters, which are used to specify the window mode and device ID for switching the mission to the foreground.| + | callback | AsyncCallback<void> | Yes| Callback used to return the result.| **Example** @@ -665,16 +666,16 @@ Switches a given mission to the foreground, with the startup parameters for the **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| missionId | number | Yes| Mission ID.| -| options | StartOptions | No| Startup parameters, which are used to specify the window mode and device ID for switching the mission to the foreground.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | missionId | number | Yes| Mission ID.| + | options | StartOptions | No| Startup parameters, which are used to specify the window mode and device ID for switching the mission to the foreground.| **Return value** -| Type| Description| -| -------- | -------- | -| Promise<void> | Promise used to return the result.| + | Type| Description| + | -------- | -------- | + | Promise<void> | Promise used to return the result.| **Example** @@ -700,13 +701,13 @@ Describes the mission information. **System capability**: SystemCapability.Ability.AbilityBase -| Name| Type| Readable| Writable| Description| +| Name| Type| Readable| Writable| Description| | -------- | -------- | -------- | -------- | -------- | -| missionId | number | Yes| Yes| Mission ID.| -| runningState | number | Yes| Yes| Running state of the mission.| -| lockedState | boolean | Yes| Yes| Locked state of the mission.| -| timestamp | string | Yes| Yes| Latest time when the mission was created or updated.| -| want | [Want](js-apis-application-Want.md) | Yes| Yes| **Want** information of the mission.| -| label | string | Yes| Yes| Label of the mission.| -| iconPath | string | Yes| Yes| Path of the mission icon.| -| continuable | boolean | Yes| Yes| Whether the mission can be continued on another device. | +| missionId | number | Yes| Yes| Mission ID.| +| runningState | number | Yes| Yes| Running state of the mission.| +| lockedState | boolean | Yes| Yes| Locked state of the mission.| +| timestamp | string | Yes| Yes| Latest time when the mission was created or updated.| +| want | [Want](js-apis-application-Want.md) | Yes| Yes| **Want** information of the mission.| +| label | string | Yes| Yes| Label of the mission.| +| iconPath | string | Yes| Yes| Path of the mission icon.| +| continuable | boolean | Yes| Yes| Whether the mission can be continued on another device. | diff --git a/en/application-dev/reference/apis/js-apis-processrunninginfo.md b/en/application-dev/reference/apis/js-apis-processrunninginfo.md index 63f61d7472be78055c0c4612aa154b2f9eb4c922..24fb9f15a5427a450ea907bb296c43f3d3f55a91 100644 --- a/en/application-dev/reference/apis/js-apis-processrunninginfo.md +++ b/en/application-dev/reference/apis/js-apis-processrunninginfo.md @@ -1,9 +1,9 @@ # ProcessRunningInfo -> **NOTE**
+> **NOTE** +> > 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. - Provides process running information. ## Modules to Import @@ -14,11 +14,8 @@ import appManager from '@ohos.application.appManager' ## Usage - The process running information is obtained through an **appManager** instance. - - ```js import appManager from '@ohos.application.appManager'; appManager.getProcessRunningInfos((error,data) => { diff --git a/en/application-dev/reference/apis/js-apis-uripermissionmanager.md b/en/application-dev/reference/apis/js-apis-uripermissionmanager.md index 9f5d4734ad55fbcbdb6692c40a0b71e0a67e0a62..6bbf0f941909786361f651546a3fab9fe129c69c 100644 --- a/en/application-dev/reference/apis/js-apis-uripermissionmanager.md +++ b/en/application-dev/reference/apis/js-apis-uripermissionmanager.md @@ -1,6 +1,7 @@ # uriPermissionManager -> **NOTE**
+> **NOTE** +> > 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. diff --git a/en/application-dev/reference/apis/js-apis-wantAgent.md b/en/application-dev/reference/apis/js-apis-wantAgent.md index dac99ebed30a69168c24d3c168aa27dd98eab0c9..3977fbfe5b6d145fba6eb07f217a4e8aa1a2d517 100644 --- a/en/application-dev/reference/apis/js-apis-wantAgent.md +++ b/en/application-dev/reference/apis/js-apis-wantAgent.md @@ -1,8 +1,8 @@ -# WantAgent Module +# WantAgent ->**NOTE** -> ->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. +> **NOTE** +> +> 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