Programmatically, how do I:
a) Find all the processess running on my Blackberry?
b) Which of those processes are running in the background?
Is there an api or documentation I can look at, or maybe get a coded example?
Thanks in advance for any help
Programmatically, how do I:
a) Find all the processess running on my Blackberry?
b) Which of those processes are running in the background?
Is there an api or documentation I can look at, or maybe get a coded example?
Thanks in advance for any help
Take a look at this answer, making sure to note the comment below the actual answer. You need to request all the module handles on the device, and then for each, check to see if they're running.
Also, see this BlackBerry forum response, with the content quoted here, because it's a non-SO site:
Another related API would be ApplicationManager.getVisibleApplications(), which allows you to list running apps, that are visible (not background services).
As for which are in the background, you will get the process IDs from above, and then you can check those against the current foreground process ID (only one can be in the foreground ... all the others are in the background). Get the foreground process ID from ApplicationManager.getForegroundProcessId()
This code will help you to find out current running applications
ApplicationManager appMan = ApplicationManager.getApplicationManager();
ApplicationDescriptor appDes[] = appMan.getVisibleApplications();
for (int i = 0; i < appDes.length; i++)
{
result = appDes[i].getModuleName();
System.Out.Println("Currently Running application " +result )
}