Working with sensors on a device

You can use the Sensor class that is included in the net.rim.device.api.system package, to determine the existence and the states of sensors on a BlackBerry® device. Sensors that you can work with include the holster sensors, slider sensors, and flip sensors.

You can use the SensorListener class that is also included in net.rim.device.api.system, to let a BlackBerry device application receive notifications when the state of a sensor changes.

Previous topic: Cradle handling

Was this information helpful? Send us your comments.