提交 0aa86242 编写于 作者: G Gloria

Update docs against 17251+17502+17346

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 c356483d
...@@ -24,9 +24,8 @@ import common from '@ohos.app.ability.common'; ...@@ -24,9 +24,8 @@ import common from '@ohos.app.ability.common';
| Context | [Context](js-apis-inner-application-context.md) | Level-2 module **Context**.| | Context | [Context](js-apis-inner-application-context.md) | Level-2 module **Context**.|
| ExtensionContext | [ExtensionContext](js-apis-inner-application-extensionContext.md) | Level-2 module **ExtensionContext**.| | ExtensionContext | [ExtensionContext](js-apis-inner-application-extensionContext.md) | Level-2 module **ExtensionContext**.|
| FormExtensionContext | [FormExtensionContext](js-apis-inner-application-formExtensionContext.md) | Level-2 module **FormExtensionContext**.| | FormExtensionContext | [FormExtensionContext](js-apis-inner-application-formExtensionContext.md) | Level-2 module **FormExtensionContext**.|
| AreaMode | [AreaMode](#areamode) | Enumerated values of **AreaMode**.| | ServiceExtensionContext | [ServiceExtensionContext](js-apis-inner-application-serviceExtensionContext.md) | Level-2 module **ServiceExtensionContext**. |
| EventHub | [EventHub](js-apis-inner-application-eventHub.md) | Level-2 module **EventHub**.| | EventHub | [EventHub](js-apis-inner-application-eventHub.md) | Level-2 module **EventHub**.|
| PermissionRequestResult | [PermissionRequestResult](js-apis-inner-application-permissionRequestResult.md) | Level-2 module **PermissionRequestResult**.|
| PacMap | [PacMap](js-apis-inner-ability-dataAbilityHelper.md#PacMap) | Level-2 module **PacMap**.| | PacMap | [PacMap](js-apis-inner-ability-dataAbilityHelper.md#PacMap) | Level-2 module **PacMap**.|
| AbilityResult | [AbilityResult](js-apis-inner-ability-abilityResult.md) | Level-2 module **AbilityResult**.| | AbilityResult | [AbilityResult](js-apis-inner-ability-abilityResult.md) | Level-2 module **AbilityResult**.|
| ConnectOptions | [ConnectOptions](js-apis-inner-ability-connectOptions.md) | Level-2 module **ConnectOptions**.| | ConnectOptions | [ConnectOptions](js-apis-inner-ability-connectOptions.md) | Level-2 module **ConnectOptions**.|
...@@ -42,21 +41,8 @@ let baseContext: common.BaseContext; ...@@ -42,21 +41,8 @@ let baseContext: common.BaseContext;
let context: common.Context; let context: common.Context;
let extensionContext: common.ExtensionContext; let extensionContext: common.ExtensionContext;
let formExtensionContext: common.FormExtensionContext; let formExtensionContext: common.FormExtensionContext;
let areaMode: common.AreaMode;
let eventHub: common.EventHub; let eventHub: common.EventHub;
let permissionRequestResult: common.PermissionRequestResult;
let pacMap: common.PacMap; let pacMap: common.PacMap;
let abilityResult: common.AbilityResult; let abilityResult: common.AbilityResult;
let connectOptions: common.ConnectOptions; let connectOptions: common.ConnectOptions;
``` ```
## AreaMode
Enumerates the data encryption levels.
**System capability**: SystemCapability.Ability.AbilityRuntime.Core
| Name | Value | Description |
| --------------- | ---- | --------------- |
| EL1 | 0 | Device-level encryption area, which is accessible after the device is powered on. |
| EL2 | 1 | User-level encryption area, which is accessible only after the device is powered on and the password is entered (for the first time).|
...@@ -48,20 +48,17 @@ Creates a **FormBindingData** object. ...@@ -48,20 +48,17 @@ Creates a **FormBindingData** object.
**Example** **Example**
```ts ```ts
import featureAbility from '@ohos.ability.featureAbility'; import formBindingData from '@ohos.app.form.formBindingData';
import fileio from '@ohos.fileio'; import fs from '@ohos.file.fs';
let context=featureAbility.getContext();
context.getOrCreateLocalDir((err,data)=>{ try {
let path=data+'/xxx.jpg'; let fd = fs.openSync('/path/to/form.png');
let fd = fileio.openSync(path);
let obj = { let obj = {
'temperature': '21°', 'temperature': '21°',
'formImages': {'image': fd} 'formImages': { 'image': fd }
}; };
try { formBindingData.createFormBindingData(obj);
formBindingData.createFormBindingData(obj); } catch (error) {
} catch (error) { console.error(`catch error, code: ${error.code}, message: ${error.message}`);
console.log(`catch err->${JSON.stringify(err)}`); }
}
})
``` ```
...@@ -130,7 +130,7 @@ Obtains the latest task status. This API uses an asynchronous callback to return ...@@ -130,7 +130,7 @@ Obtains the latest task status. This API uses an asynchronous callback to return
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ------------------------------------- | ---- | ---------------------------------------- | | -------- | ------------------------------------- | ---- | ---------------------------------------- |
| workId | number | Yes | Task ID. | | workId | number | Yes | Task ID. |
| callback | AsyncCallback\<[WorkInfo](#workinfo)> | Yes | Callback used to return the result. Returns the task status obtained from the **WorkSchedulerService** if the specified task ID is valid; returns **null** otherwise.| | callback | AsyncCallback\<[WorkInfo](#workinfo)> | Yes | Callback used to return the result. Returns the task status obtained from the **WorkSchedulerService** if the specified task ID is valid; throws an exception otherwise. |
**Error codes** **Error codes**
...@@ -178,7 +178,7 @@ Obtains the latest task status. This API uses a promise to return the result. ...@@ -178,7 +178,7 @@ Obtains the latest task status. This API uses a promise to return the result.
| Type | Description | | Type | Description |
| ------------------------------- | ---------------------------------------- | | ------------------------------- | ---------------------------------------- |
| Promise\<[WorkInfo](#workinfo)> | Promise used to return the result. Returns the task status obtained from the **WorkSchedulerService** if the specified task ID is valid; returns **null** otherwise.| | Promise\<[WorkInfo](#workinfo)> | Promise used to return the result. Returns the task status obtained from the **WorkSchedulerService** if the specified task ID is valid; throws an exception otherwise. |
**Error codes** **Error codes**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册