提交 f9e5dcbe 编写于 作者: G Gloria

Update docs against 15247+14265

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 0c2853e8
...@@ -9,7 +9,7 @@ The **appManager** module implements application management. You can use the API ...@@ -9,7 +9,7 @@ The **appManager** module implements application management. You can use the API
## Modules to Import ## Modules to Import
```ts ```ts
import appManager from '@ohos.application.appManager'; import app from '@ohos.application.appManager';
``` ```
## appManager.isRunningInStabilityTest<sup>8+</sup> ## appManager.isRunningInStabilityTest<sup>8+</sup>
......
...@@ -13,11 +13,10 @@ The **ProcessData** module defines process data. If a lifecycle change listener ...@@ -13,11 +13,10 @@ The **ProcessData** module defines process data. If a lifecycle change listener
| uid<sup>8+</sup> | number | Yes | No | UID of the application. | | uid<sup>8+</sup> | number | Yes | No | UID of the application. |
| isContinuousTask<sup>9+</sup> | boolean | Yes | No | Whether the task is a continuous task. The value **true** means that the task is a continuous task, and **false** means the opposite. | | isContinuousTask<sup>9+</sup> | boolean | Yes | No | Whether the task is a continuous task. The value **true** means that the task is a continuous task, and **false** means the opposite. |
| isKeepAlive<sup>9+</sup> | boolean | Yes | No | Whether the process is a resident task. The value **true** means that the process is a resident, and **false** means the opposite. | | isKeepAlive<sup>9+</sup> | boolean | Yes | No | Whether the process is a resident task. The value **true** means that the process is a resident, and **false** means the opposite. |
| state<sup>9+</sup> | number | Yes | No | Application state. The value can be **0** (newly created), **2** (foreground), **4** (background), or **5** (terminated). |
**Example** **Example**
```ts ```ts
import appManager from '@ohos.application.appManager' import appManager from '@ohos.application.appManager';
let applicationStateObserver = { let applicationStateObserver = {
onForegroundApplicationChanged(appStateData) { onForegroundApplicationChanged(appStateData) {
...@@ -39,6 +38,6 @@ let applicationStateObserver = { ...@@ -39,6 +38,6 @@ let applicationStateObserver = {
console.log('onProcessStateChanged processData.isContinuousTask : ' + JSON.stringify(processData.isContinuousTask)); console.log('onProcessStateChanged processData.isContinuousTask : ' + JSON.stringify(processData.isContinuousTask));
console.log('onProcessStateChanged processData.isKeepAlive : ' + JSON.stringify(processData.isKeepAlive)); console.log('onProcessStateChanged processData.isKeepAlive : ' + JSON.stringify(processData.isKeepAlive));
} }
} };
let observerCode = appManager.registerApplicationStateObserver(applicationStateObserver); let observerCode = appManager.registerApplicationStateObserver(applicationStateObserver);
``` ```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册