未验证 提交 083bd12c 编写于 作者: O openharmony_ci 提交者: Gitee

!4445 Fix release document interface question of ability

Merge pull request !4445 from yuyaozhi/OpenHarmony-3.1-Release
......@@ -5,6 +5,12 @@
Ability的上下文环境,继承自Context。
# 导入模块
```js
import Ability from '@ohos.application.Ability'
```
## 使用说明
在使用AbilityContext的功能前,需要通过Ability子类实例获取。
```js
......
......@@ -6,6 +6,12 @@
>
> API 9当前为Canary版本,仅供试用,不保证接口可稳定调用。
# 导入模块
```js
import AbilityManager from '@ohos.application.abilityManager'
```
## AbilityState
Ability的状态信息。
......
......@@ -7,6 +7,11 @@
AbilityStage的上下文环境,继承自[Context](js-apis-application-context.md)
## 导入模块
```js
import AbilityStage from '@ohos.application.AbilityStage';
```
## 使用说明
......
......@@ -6,6 +6,11 @@
Ability运行相关信息。
# 导入模块
```js
import abilitymanager from '@ohos.application.abilityManager';
```
## 使用说明
......
......@@ -719,7 +719,7 @@ abilityDelegator.executeShellCommand(cmd, timeout, (err, data) => {
### executeShellCommand
executeShellCommand(cmd: string, timeoutSecs: number): Promise\<ShellCmdResult>
executeShellCommand(cmd: string, timeoutSecs?: number): Promise\<ShellCmdResult>;
指定超时时间,并执行指定的shell命令(promise形式)
......
......@@ -7,6 +7,7 @@
提供开发者运行代码的上下文环境,包括应用信息、ResourceManager等信息。
## 使用说明
......
# MissionInfo
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
```
import MissionInfo from '@ohos.application.missionInfo';
```
## MissionInfo
表示Ability对应任务信息的枚举。
**系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityBase
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
| missionId | number | 是 | 是 | 表示任务ID。|
| runningState | number | 是 | 是 | 表示运行状态。 |
| lockedState | boolean | 是 | 是 | 表示锁定状态。 |
| timestamp | string | 是 | 是 | 表示任务的最近创建或更新时间。 |
| want | [Want](js-apis-featureAbility.md#want) | 是 | 是 | 表示任务的Want信息。 |
| label | string | 是 | 是 | 表示任务的标签。 |
| iconPath | string | 是 | 是 | 表示任务的图标路径。 |
| continuable | boolean | 是 | 是 | 表示任务是否可以继续。 |
\ No newline at end of file
......@@ -160,7 +160,7 @@ getAppMemorySize(callback: AsyncCallback\<number>): void;
```
## appManager.getProcessRunningInfos<sup>8+</sup>
getProcessRunningInfos(): Promise<Array<ProcessRunningInfo>>;
getProcessRunningInfos(): Promise<Array\<ProcessRunningInfo>>;
获取有关运行进程的信息。
......@@ -184,7 +184,7 @@ getProcessRunningInfos(): Promise<Array<ProcessRunningInfo>>;
## appManager.getProcessRunningInfos<sup>8+</sup>
getProcessRunningInfos(callback: AsyncCallback<Array<ProcessRunningInfo>>): void;
getProcessRunningInfos(callback: AsyncCallback<Array\<ProcessRunningInfo>>): void;
获取有关运行进程的信息。
......
......@@ -5,6 +5,13 @@
## 导入模块
```js
import featureAbility from '@ohos.ability.featureAbility'
```
## 使用说明
使用前根据具体情况引入如下模块
```
import featureAbility from '@ohos.ability.featureAbility'
import ohos_data_ability from '@ohos.data.dataability'
......
......@@ -8,6 +8,12 @@
事件中心,提供订阅、取消订阅、触发事件能力。
## 导入模块
```js
import Ability from '@ohos.application.Ability'
```
## 使用说明
......
......@@ -4,6 +4,13 @@
>
> 本模块首批接口从API version 9开始支持。API 9当前为Canary版本,仅供使用,不保证接口可稳定调用。
## 导入模块
```js
import bundle from "@ohos.bundle";
```
## AbilityInfo
Ability信息
......
......@@ -8,6 +8,12 @@
Extension运行相关信息。
## 导入模块
```js
import abilitymanager from '@ohos.application.abilityManager';
```
## 使用说明
......
......@@ -5,6 +5,12 @@
FormExtension的上下文环境,提供FormExtension具有的能力和接口,继承自ExtensionContext。
## 导入模块
```js
import FormExtension from "@ohos.application.FormExtension";
```
## FormExtensionContext.updateForm
updateForm(formId: string, formBindingData: formBindingData.FormBindingData, callback: AsyncCallback\<void>): void
......
......@@ -591,7 +591,7 @@ SystemCapability.Ability.Form
## getAllFormsInfo
getAllFormsInfo(callback: AsyncCallback&lt;Array&lt;FormInfo&gt;&gt;): void;
getAllFormsInfo(callback: AsyncCallback&lt;Array&lt;formInfo.FormInfo&gt;&gt;): void;
获取设备上所有应用提供的卡片信息。
......@@ -619,7 +619,7 @@ SystemCapability.Ability.Form
## getAllFormsInfo
getAllFormsInfo(): Promise&lt;Array&lt;FormInfo&gt;&gt;;
getAllFormsInfo(): Promise&lt;Array&lt;formInfo.FormInfo&gt;&gt;;
获取设备上所有应用提供的卡片信息。
......@@ -645,7 +645,7 @@ SystemCapability.Ability.Form
## getFormsInfo
getFormsInfo(bundleName: string, callback: AsyncCallback&lt;Array&lt;FormInfo&gt;&gt;): void;
getFormsInfo(bundleName: string, callback: AsyncCallback&lt;Array&lt;formInfo.FormInfo&gt;&gt;): void;
获取设备上指定应用程序提供的卡片信息。
......@@ -674,7 +674,7 @@ SystemCapability.Ability.Form
## getFormsInfo
getFormsInfo(bundleName: string, moduleName: string, callback: AsyncCallback&lt;Array&lt;FormInfo&gt;&gt;): void;
getFormsInfo(bundleName: string, moduleName: string, callback: AsyncCallback&lt;Array&lt;formInfo.FormInfo&gt;&gt;): void;
获取设备上指定应用程序提供的卡片信息。
......@@ -704,7 +704,7 @@ SystemCapability.Ability.Form
## getFormsInfo
getFormsInfo(bundleName: string, moduleName?: string): Promise&lt;Array&lt;FormInfo&gt;&gt;;
getFormsInfo(bundleName: string, moduleName?: string): Promise&lt;Array&lt;formInfo.FormInfo&gt;&gt;;
获取设备上指定应用程序提供的卡片信息。
......@@ -767,7 +767,7 @@ SystemCapability.Ability.Form
## deleteInvalidForms
function deleteInvalidForms(formIds: Array&lt;string&gt;): Promise&lt;number&gt;;
deleteInvalidForms(formIds: Array&lt;string&gt;): Promise&lt;number&gt;;
根据列表删除应用程序的无效卡片。
......@@ -800,7 +800,7 @@ SystemCapability.Ability.Form
## acquireFormState
acquireFormState(want: Want, callback: AsyncCallback&lt;FormStateInfo&gt;): void;
acquireFormState(want: Want, callback: AsyncCallback&lt;formInfo.FormStateInfo&gt;): void;
获取卡片状态
......@@ -834,7 +834,7 @@ SystemCapability.Ability.Form
## acquireFormState
function acquireFormState(want: Want): Promise&lt;FormStateInfo&gt;;
acquireFormState(want: Want): Promise&lt;formInfo.FormStateInfo&gt;;
获取卡片状态。
......
......@@ -80,7 +80,7 @@ SystemCapability.Ability.Form
## updateForm
updateForm(formId: string, formBindingData: FormBindingData, callback: AsyncCallback&lt;void&gt;): void;
updateForm(formId: string, formBindingData: formBindingData.FormBindingData, callback: AsyncCallback&lt;void&gt;): void;
更新指定的卡片。
......@@ -111,7 +111,7 @@ SystemCapability.Ability.Form
## updateForm
updateForm(formId: string, formBindingData: FormBindingData): Promise&lt;void&gt;;
updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Promise&lt;void&gt;;
更新指定的卡片,以promise方式返回。
......
......@@ -685,19 +685,3 @@ moveMissionToFront(missionId: number, options?: StartOptions): Promise&lt;void&g
});
```
## MissionInfo
表示Ability对应任务信息的枚举。
**系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityBase
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
| missionId | number | 是 | 是 | 表示任务ID。|
| runningState | number | 是 | 是 | 表示运行状态。 |
| lockedState | boolean | 是 | 是 | 表示锁定状态。 |
| timestamp | string | 是 | 是 | 表示任务的最近创建或更新时间。 |
| want | [Want](js-apis-featureAbility.md#want) | 是 | 是 | 表示任务的Want信息。 |
| label | string | 是 | 是 | 表示任务的标签。 |
| iconPath | string | 是 | 是 | 表示任务的图标路径。 |
| continuable | boolean | 是 | 是 | 表示任务是否可以继续。 |
......@@ -4,9 +4,14 @@
>
> 本模块首批接口从API version 9开始支持。API 9当前为Canary版本,仅供使用,不保证接口可稳定调用。
权限请求结果。
## 导入模块
```js
import Ability from '@ohos.application.Ability'
```
## 属性
......
......@@ -7,6 +7,12 @@
进程运行信息。
## 导入模块
```js
import appManager from '@ohos.application.appManager'
```
## 使用说明
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册