未验证 提交 6207a8ea 编写于 作者: O openharmony_ci 提交者: Gitee

!11803 翻译完成:9969 Fix issues of Ability docs

Merge pull request !11803 from wusongqing/TR9969
......@@ -8,17 +8,17 @@ The **ShellCmdResult** module provides the shell command execution result.
## Usage
The result is obtained by calling **executeShellCommand** in **abilityDelegator**.
The result is obtained by calling [executeShellCommand](js-apis-application-abilityDelegator.md#executeshellcommand) in **abilityDelegator**.
```js
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
var abilityDelegator;
var cmd = "cmd";
var timeout = 100;
import AbilityDelegatorRegistry from "@ohos.application.abilityDelegatorRegistry";
let abilityDelegator;
let cmd = "cmd";
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.executeShellCommand(cmd, timeout).then((data : any) => {
console.info("executeShellCommand promise");
abilityDelegator.executeShellCommand(cmd, (err: any, data: any) => {
console.info("executeShellCommand callback, failed: ", err);
console.info("executeShellCommand callback, success: ", data);
});
```
......
......@@ -8,12 +8,14 @@ The **ProcessRunningInfo** module provides process running information.
## Usage
The process running information is obtained through an **appManager** instance.
The process running information is obtained by using [getProcessRunningInfos](js-apis-appmanager.md#appmanagergetprocessrunninginfosdeprecated) in **appManager**.
```js
import appManager from '@ohos.application.appManager';
appManager.getProcessRunningInfos((error,data) => {
console.log("getProcessRunningInfos error: " + error.code + " data: " + JSON.stringify(data));
app.getProcessRunningInfos().then((data) => {
console.log('success:' + JSON.stringify(data));
}).catch((error) => {
console.log('failed:' + JSON.stringify(error));
});
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册