如何获得黑莓手机上的后台进程的列表 [英] How to get a list of background processes on BlackBerry
问题描述
我在找对应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...
推荐答案
如果您知道应用程序的名称,你可以检测它是否是通过检查包含所有AppDescriptor实际运行这个程序的数组的大小正在运行。
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屋!