A BlackBerry® device with a touch screen includes an accelerometer, which is designed to sense the orientation and acceleration of the BlackBerry device. When a BlackBerry device user moves the BlackBerry device, the accelerometer can sense the movement in 3-D space along the x, y, and z axis. A device user can change the orientation of the device which can change the display direction of a screen for a BlackBerry device application between portrait and landscape.

You can use the Accelerometer APIs in the net.rim.device.api.system package to respond to the orientation and acceleration of a BlackBerry device. For example, you can manipulate a game application to change the direction and speed of a moving object on the screen as a user moves and rotates the BlackBerry device at different speeds.

To download a sample application that demonstrates how to use the accelerometer, visit For more information about the sample application, visit to read the Accelerometer Sample Application Overview.

Was this information helpful? Send us your comments.