Reputation: 2285
I want to get the application module name I have installed in Blackberry, just like "Messages","Contacts" etc. How can i get this module's names which are running now?
Upvotes: 0
Views: 821
Reputation: 3674
Check following code snippet:
//get the ApplicationManager
ApplicationManager appMan = ApplicationManager.getApplicationManager();
//grab the running applications
ApplicationDescriptor[] appDes = appMan.getVisibleApplications();
int size = appDes.length;
for (int i = size - 1; i >= 0; --i) {
String moduleName = appDes[i].getModuleName();
String name = appDes[i].getName();
// other codes....
}
Also read the API documentation for following classes:
Upvotes: 0
Reputation: 533
You can get the current applications module name or handle by using this line:
String name = ApplicationDescriptor.currentApplicationDescriptor().getModuleName();
This returns the string of the module handle of this application. Or by using
int handle = ApplicationDescriptor.currentApplicationDescriptor().getModuleHandle();
Upvotes: 1
Reputation: 1278
If you want to get the Application Version (programatically) you can use:
net.rim.device.api.system.DeviceInfo.getSoftwareVersion()
Upvotes: 0