未验证 提交 73d5106d 编写于 作者: O openharmony_ci 提交者: Gitee

!15550 翻译完成:15275 资料描述修改

Merge pull request !15550 from wusongqing/TR15275
...@@ -101,7 +101,7 @@ export default class MyWindowExtensionAbility extends WindowExtensionAbility { ...@@ -101,7 +101,7 @@ export default class MyWindowExtensionAbility extends WindowExtensionAbility {
window.loadContent('WindowExtAbility/pages/index1').then(() => { window.loadContent('WindowExtAbility/pages/index1').then(() => {
window.getProperties().then((pro) => { window.getProperties().then((pro) => {
console.log('WindowExtension ' + JSON.stringify(pro)); console.log('WindowExtension ' + JSON.stringify(pro));
}) });
window.show(); window.show();
}) })
} }
......
...@@ -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.
先完成此消息的编辑!
想要评论请 注册