harmony(鸿蒙)ProcessRunningInfo(deprecated)
ProcessRunningInfo(deprecated)
本模块提供对进程运行信息进行设置和查询的能力。
说明: - 本模块接口从API version 9 开始废弃,建议使用ProcessRunningInformation9+替代。 - 本模块首批接口从API version 8 开始支持。
使用说明
通过appManager中getProcessRunningInfos方法来获取。
import appManager from '@ohos.application.appManager';
app.getProcessRunningInfos().then((data) => {
    console.log('success:' + JSON.stringify(data));
}).catch((error) => {
    console.log('failed:' + JSON.stringify(error));
});
属性
系统能力:以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Mission
| 名称 | 参数类型 | 可读 | 可写 | 说明 | 
|---|---|---|---|---|
| pid | number | 是 | 否 | 进程ID。 | 
| uid | number | 是 | 否 | 用户ID。 | 
| processName | string | 是 | 否 | 进程名称。 | 
| bundleNames | Array<string> | 是 | 否 | 进程中所有运行的包名称。 | 
你可能感兴趣的鸿蒙文章
harmony(鸿蒙)BundleStatusCallback
harmony(鸿蒙)innerBundleManager模块(deprecated)
harmony(鸿蒙)distributedBundle模块(JS端SDK接口)
                        
                            0
                        
                        
                             赞
                        
                    
                    
                热门推荐
- 
                        2、 - 优质文章
 - 
                        3、 gate.io
 - 
                        7、 openharmony
 - 
                        9、 golang