Arindam Mukherjee
Arindam Mukherjee

Reputation: 2285

To get the module names in blackberry

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

Answers (3)

Rupak
Rupak

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

Jake
Jake

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

Tariq M Nasim
Tariq M Nasim

Reputation: 1278

If you want to get the Application Version (programatically) you can use:

net.rim.device.api.system.DeviceInfo.getSoftwareVersion()

Upvotes: 0

Related Questions