sensor_event_get_proximity()

Retrieve the proximity from a SENSOR_PROXIMITY_READING event.

Synopsis:

#include <bps/sensor.h>
 
BPS_API float sensor_event_get_proximity(bps_event_t *event)

Since:

BlackBerry 10.0.0

Arguments:

event

The SENSOR_PROXIMITY_READING event to get the proximity from.

Library:

libbps (For the qcc command, use the -l bps option to link against this library)

Description:

The sensor_event_get_proximity() function gets the proximity from the specified SENSOR_PROXIMITY_READING event. The proximity indicates whether the closest object to the device is near or far from the device.

Returns:

The proximity as a boolean value of 0.0f (close) and 1.0f (far) when the function completes successfully, NaN with the errno value set otherwise.

Last modified: 2014-05-14



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus