Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:SensorManager does not work with non-English phone languages in S60 3rd Edition FP2 (Known Issue)

From 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}}.

Article Metadata
Tested with
Devices(s): Nokia N86 8MP (V 30.009)
S60 3rd Edition FP2
Created: User:Kbwiki (07 May 2010)
Last edited: hamishwillee (22 Jul 2013)


Mobile Sensor API (JSR-256) was first included with Java Runtime 1.4 for S60, which is supported in a number of S60 3rd Edition, Feature Pack 2 and later devices. The Java Runtime version on a Symbian device can be checked by using the following method: System.getProperty("microedition.platform");

On certain S60 3rd Edition, Feature Pack 2 devices which support Mobile Sensor API, when the phone is set to a non-English language (for example, French or German) and JSR-256 Mobile Sensor API is used, the MIDlet throws NumberFormatException and NoClassDefFoundError. These are due to javax.microedition.sensor.SensorManager which cannot be found when non-English languages are used.

How to reproduce

  1. For reference testing, check that the phone language is set to English.
    The phone language can be set from Personalisation settings, for example for the Nokia N86 8MP: Menu > Tools > Settings > General > Personalisation > Language > Phone language > English / Deutsch (German) / Français (French) / Italiano (Italian)
  2. Check the availability of the SensorManager class by implementing a test MIDlet which includes the following code snippet:
     try {
    //Implement a logic for the result of class found
    catch (ClassNotFoundException e) {
    //Handle the exception
    catch (Error e) {
    //Handle the error
  3. Change the phone language to a non-English language (French/German/Italian/...)
  4. Retest step 2). NumberFormatException and NoClassDefFoundError will be thrown on affected devices.


This issue has been fixed in the latest phone software releases for most of the affected devices. However, in case there is not a firmware update with the fix available (for example, for the Nokia N86), Mobile Sensor API can only be used if English is set as the phone language.

This page was last modified on 22 July 2013, at 23:09.
115 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.