Example: Creating a location-aware city guide with in-app purchase support

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

Prerequisites

You need the following to develop and test this MIDlet:

  • Nokia SDK 1.1 for Java or newer

    Note: The Series 40 full touch version of the MIDlet requires Nokia SDK 2.0 for Java or newer.

  • Series 40 device with Java Runtime 1.1.0 for Series 40 or newer

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

For instructions on how to set up the Java ME development environment, see section Setting up the development environment.

Development

For more information about the MIDlet, see:

  • Design for information about the design and functionality of the MIDlet

  • Implementation for information about implementing the MIDlet

You can download the project files for the MIDlet from the download page.