Domanda

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

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top