This example MIDlet shows you how to use GPS features on Series 40 devices. The MIDlet is designed to look like a normal compass. When the device is pointed in the direction the user is moving, the compass indicates the north direction. The compass also shows the direction of selected landmarks.
This MIDet is optimized for Series 40 devices with GPS and a 240 x 320 resolution, especially Nokia 2710 Navigation Edition. However, it also works on other Nokia devices with GPS.
Figure: Compass MIDlet running on a Series 40 device showing the direction of Mecca
For a tutorial that shows you how to create this MIDlet, see section Example: Using GPS features.
This MIDlet is compatible with Series 40 6th Edition devices and newer with GPS support.
Note: The MIDlet has been designed for the 240 x 320 resolution, which means that the MIDlet is not fully optimized, though still functional, on devices with a different resolution.
This MIDlet has been tested on the following devices:
Nokia 2710 Navigation Edition (Series 40 6th Edition)
Nokia 6260 Slide (Series 40 6th Edition) (UI not optimized)
Nokia 6700 Classic (Series 40 6th Edition)
Nokia X3-02 (Series 40 6th Edition Feature Pack 1)
The MIDlet project files are packaged as a zip file. To download the zip file, click the following link:
For possible newer version, other updates or additional documentation, check the Compass at Nokia Developer Projects.
The MIDlet consists of the following packages and classes (click to view the full source code):
com.nokia.example.compass
com.nokia.example.compass.helpers
com.nokia.example.compass.views