Location services - Tourist Attractions

Description

This example MIDlet shows you how to create a location-aware city guide that lists the most notable tourist attractions nearby and shows detailed information about them. The user can browse tourist attractions, read about them, and view them on a map. The MIDlet uses the Location API to determine the user's current location and the Nokia Maps API to implement the map functionality. The MIDlet also uses the In-App Purchase API to implement a Nokia Store purchasing feature with non-DRM-protected content stored on a back-end server.

This example demonstrates how to:

  • Display a map using the Nokia Maps API

  • Display the user's current location on the map

  • Implement an in-app purchase feature

  • Retrieve purchased content from a back-end server

  • Implement scrollable views using the Gesture API and Frame Animator API

Figure: Tourist Attractions MIDlet views

For a tutorial that shows you how to create this MIDlet, see section Example: Creating a location-aware city guide with in-app purchase support.

Compatibility

This MIDlet is provided in two versions:

  • The regular version is compatible with Series 40 3rd Edition FP1 and S60 3rd Edition devices and newer.

  • The Series 40 full touch version is compatible with Series 40 3rd Edition FP1 and S60 3rd Edition devices and newer, but the Series 40 full touch features are only available on Series 40 full touch devices with Java Runtime 2.0.0 for Series 40 or newer.

Note: The device screen must be 240 pixels wide or wider.

This MIDlet has been tested on the following devices:

  • Nokia 5530 XpressMusic (S60 5th Edition with Java Runtime 1.4 for S60)

  • Nokia 701 (Symbian Belle with Java Runtime 2.3 for Symbian)

  • Nokia Asha 201 (Java Runtime 1.1.0 for Series 40)

  • Nokia Asha 303 (Java Runtime 1.1.0 for Series 40)

  • Nokia Asha 311 (Java Runtime 2.0.0 for Series 40)

  • Nokia E61i (S60 3rd Edition)

  • Nokia E71 (S60 3rd Edition FP1)

  • Nokia N78 (S60 3rd Edition FP2)

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

MIDlet project

The MIDlet project files are packaged as a zip file. The zip file includes two projects: the regular version and the Series 40 full touch version. To download the zip file, click the following link:

Download Tourist Attractions

Table: MIDlet details (regular version)

MIDlet version

1.1.1

Creation date

11 May 2012

IDE

Eclipse and NetBeans

SDK

Nokia SDK 1.1 for Java

Table: MIDlet details (Series 40 full touch version)

MIDlet version

1.2

Creation date

20 June 2012

IDE

Eclipse and NetBeans

SDK

Nokia SDK 2.0 for Java

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):

Note: The source code is from the Series 40 full touch version of the MIDlet. To view the source code of the regular version, see the source code files in the zip file.