05-27-2010 06:50 AM
Hi Guys,i want to know how to get the platform or os version in the simulator.I got know abt the deviceInfo class,but at the sametime ,it's not working in the simulator,By Using this OS Version,i have to select the method to retrieve the icon images of the application.
Before 4.7 OS it supports .getIcon() method.But from 4.7 it supports getEncodedIcon(),By Checking the OS Version,i can call these methods.So i need to know how to get the OS versions?
Regards
Rakesh Shankar.P
05-27-2010 07:09 AM
hi
next time try to use the search in the forum or the KB articles.
String version = "";
ApplicationDescriptor[] ad = ApplicationManager.getApplicationManager().getVisi bleApplications();
for ( int i = 0; i < ad.length; i++ )
{
if ( ad[i].getModuleName().trim().equalsIgnoreCase("net _rim_bb_ribbon_app") )
{
version = ad[i].getVersion();
break;
}
}
ad = null;
With DeviceInfo.getPlatformVersion() you will get an empty string on the emulator.
06-18-2010 10:23 AM
CodeModuleManager.getModuleVersion((CodeModuleManager.getModuleHandleForObject("")));