提交 3ff4e2ee 编写于 作者: G Gloria

Update docs against 9969

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 d02dd0eb
......@@ -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.
先完成此消息的编辑!
想要评论请 注册