×
Namespaces

Variants
Actions
Revision as of 09:56, 15 October 2012 by hamishwillee (Talk | contribs)

Archived:Identifying Java ME platform version

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

This information is now in the Java Developer Library: Determining the Java Runtime for Symbian version.

Article Metadata
Code ExampleTested with
Devices(s): Nokia N80, Nokia N78, Nokia 5800 XpressMusic, Nokia 6131, Nokia 701, Nokia Asha 305
CompatibilityArticle
Keywords: System.getProperty, microedition.platform
Created: olkazmin (19 Feb 2009)
Last edited: hamishwillee (15 Oct 2012)

Contents

Overview

This 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.

73 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×