sensor_set_background()

Enable or disable background mode.

Synopsis:

#include <sensor/libsensor.h>
 
int sensor_set_background(sensor_t *sensor, bool enable)

Since:

BlackBerry 10.0.0

Arguments:

sensor

The sensor to modify.

enable

1 to enable background mode, or 0 to disable it.

Library:

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

Description:

When background mode is enabled, the sensor isn't automatically disabled when the device is in standby. This is useful for clients that wish to continue to receive sensor events when the screen is off. Power consumption must be considered when using this feature.

Returns:

EOK on success, an errno value otherwise.

Last modified: 2014-05-14



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

comments powered by Disqus