質問

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...

役に立ちましたか?

解決

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);
}

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top