如何获得黑莓手机上的后台进程的列表 [英] How to get a list of background processes on BlackBerry

查看:204
本文介绍了如何获得黑莓手机上的后台进程的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在找对应net.rim.device.api.system.ApplicationManager.getVisibleApplications()的东西,但包括可能不是/不具有UI应用程序。有任何想法吗?

I'm looking for something corresponding to net.rim.device.api.system.ApplicationManager.getVisibleApplications(), but including applications that might not/do not have a UI. Any ideas?

无理复杂的变通解决方案的欢迎,我慢慢的成长更确定有没有一个简单的单呼做到这一点...

Unreasonably complicated work-around solutions welcome, I'm growing slowly more sure that there's not a simple single call to do this...

推荐答案

如果您知道应用程序的名称,你可以检测它是否是通过检查包含所有AppDesc​​riptor实际运行这个程序的数组的大小正在运行。

If you know the application name you can detect if it is running or not by checking the size of the array containing all AppDescriptor actually running this app.

int codeModuleHandle = CodeModuleManager.getModuleHandle(applicationPackageName);

if (codeModuleHandle != 0) {
   ApplicationDescriptor[] apDes = CodeModuleManager.getApplicationDescriptors(codeModuleHandle);
}

您可以设想一个code得到所有安装的应用程序,然后检查

You could imagine a code to get all installed application and then check

这篇关于如何获得黑莓手机上的后台进程的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆