当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
1.4K Star 7.4K Fork 8.2K

OpenHarmony/docs
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
js-apis-processrunninginfo.md 996 Bytes
一键复制 编辑 原始数据 按行查看 历史

ProcessRunningInfo

ProcessRunningInfo模块提供对进程运行信息进行设置和查询的能力。

说明:

本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。

使用说明

通过appManager来获取。

import appManager from '@ohos.application.appManager';
appManager.getProcessRunningInfos((error,data) => { 
    console.log("getProcessRunningInfos error: "  + error.code + " data: " + JSON.stringify(data));
});

属性

系统能力:以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Core

名称 参数类型 可读 可写 说明
pid number 进程ID。
uid number 用户ID。
processName string 进程名称。
bundleNames Array<string> 进程中所有运行的包名称。
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
其他
1
https://gitee.com/openharmony/docs.git
git@gitee.com:openharmony/docs.git
openharmony
docs
docs
OpenHarmony-3.2-Beta1

搜索帮助