Location services - Compass

Description

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.

Compatibility

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)

MIDlet project

The MIDlet project files are packaged as a zip file. To download the zip file, click the following link:

Download Compass

Table: MIDlet details

MIDlet version

1.0

Creation date

04 January 2012

IDE

Nokia IDE for Java ME (Eclipse) and NetBeans

SDK

Series 40 6th Edition Feature Pack 1 SDK

For possible newer version, other updates or additional documentation, check the Compass at Nokia Developer Projects.

MIDlet classes

The MIDlet consists of the following packages and classes (click to view the full source code):