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.
- Check for a sensor on the device
- Check the state of a sensor
- Notify an application when the state of a sensor changes
- Code sample: Working with a sensor
Next topic: Check for a sensor on the device
Previous topic: Cradle handling