This example shows you how to receive accelerometer values and use them
to navigate a picture. The example MIDlet consists of two classes: Panorama
and PanoramaCanvas
.
The MIDlet loads a preset image into the device display and scrolls it across the screen according to the device's orientation. The image used here is a 360 degree panorama loop that wraps around horizontally. The image is provided courtesy of www.roundus.com where you can find other similar images.
Figure: Part of the panorama image used in the example
For a detailed overview of the MIDlet, see section Developing Panorama MIDlet. You can find the complete source code with the included image from section Mobile Sensor API - Navigating an image with the accelerometer.