Retrieve whether the device is holstered.
#include <bps/sensor.h>
BPS_API int sensor_event_is_holstered(bps_event_t *event,
bool *is_holstered)
BlackBerry 10.2.0
The SENSOR_HOLSTER_READING event to get the value from.
This is set to true if the device is holstered, false otherwise.
The sensor_event_is_holstered() function sets is_holstered to true when the device is holstered. When the device is removed from the holster is_holstered will be set to false. The value is retrieved from a SENSOR_HOLSTER_READING event.
BPS_FAILURE will be returned if the event passed in is not a SENSOR_HOLSTER_READING, or if is_holstered is NULL.