This opens some intriguing possibilities for your applications. By
monitoring orientation, direction, and movement, you can:
• Use the compass and accelerometers to determine your heading and
orientation. Use these with a map, camera, and location-based service
to create augmented-reality UIs that overlay location-based data over a
real-time camera feed.
• Create UIs that adjust dynamically as the orientation of the device
changes. In the most simple case, Android alters the screen orientation
when the device is rotated from portrait to landscape or vice versa, but
applications such as the native Gallery use orientation changes to
provide a 3D effect on stacks of photos.