×
Namespaces

Variants
Actions

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
Created: olkazmin (19 Feb 2009)
Last edited: hamishwillee (22 Jul 2013)

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.

This page was last modified on 22 July 2013, at 10:30.
97 page views in the last 30 days.