This example MIDlet shows you how to use sensor data. The MIDlet demonstrates the basics of sensor operation, such as opening a sensor connection, listening to sensor values, and closing a sensor connection.
Figure: ArrowKeys MIDlet
For a tutorial that shows you how to create this MIDlet, see section Example: Using sensor data.
This MIDlet is compatible with Java Runtime 2.0.0 for Series 40 and S60 5th Edition devices and newer.
This MIDlet has been tested on the following devices:
Nokia Asha 305 (Java Runtime 2.0.0 for Series 40)
Nokia Asha 311 (Java Runtime 2.0.0 for Series 40)
Nokia N8-00 (Symbian Anna with Java Runtime 2.2 for Symbian)
Nokia N97 (S60 5th Edition)
The MIDlet project files are packaged as a zip file. To download the zip file, click the following link:
The MIDlet consists of the following class (click to view the full source code):