Location services - Compass

Description

This example MIDlet shows you how to use GPS features on Series 40 and Symbian 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 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 and S60 3rd 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 701 (Symbian Belle with Java Runtime 2.3 for Symbian) (UI not optimized)

  • Nokia 2710 Navigation Edition (Series 40 6th Edition)

  • Nokia 6210 Navigator (S60 3rd Edition FP2)

  • Nokia 6260 Slide (Series 40 6th Edition) (UI not optimized)

  • Nokia 6700 Classic (Series 40 6th Edition)

  • Nokia E75 (S60 3rd Edition FP2)

  • Nokia X3-02 (Series 40 6th Edition FP1)

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

Eclipse and NetBeans

SDK

Series 40 6th Edition FP1 SDK

For earlier versions of the MIDlet, see the Nokia Developer Project.

MIDlet classes

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