You Are Here:

Community: Wiki

This page was last modified on 16 June 2009, at 10:42.

CS001392 - Identifying Java ME platform version

From Forum Nokia Wiki



ID CS001392 Creation date June 5, 2009
Platform S60 3rd Edition FP1, S60 3rd Edition FP2, S60 5th Edition, S40 3rd Edition FP 1 Tested on devices Nokia N80, Nokia N78, Nokia 5800 XpressMusic, Nokia 6131
Category Java ME Subcategory System information


Keywords (APIs, classes, methods, functions): System.getProperty, microedition.platform

Overview

The following code snippet demonstrates how to identify the platform version of the device using Java ME.

The platform version can be retrieved just like any system property using the method System.getProperty. The method returns a string containing the specified property.

Source

/**
* Executes the snippet.
* Gets platform version and prints it to the log.
*/

private void executeSnippet() {
String platformVersion = System.getProperty("microedition.platform");
if (platformVersion != null) {
printString("Version: " + platformVersion);
} else {
printString("Version NOT found!");
}
}

Postconditions

The platform version is displayed on the screen.

Supplementary material

This code snippet is part of the stub concept, which means that it has been patched on top of a template application in order to be more useful to developers. The version of the Java ME stub application used as a template in this snippet is v1.1.

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia