sensor_devctl_bkgrnd_u

Structure for enabling and disabling background mode (sensor works while system in user standby mode).

Synopsis:

typedef union {
    sensor_devctl_enable_tx_t tx;
} sensor_devctl_bkgrnd_u;

Since:

BlackBerry 10.0.0

Data:

sensor_devctl_enable_tx_t tx
The device enable structure.

Library:

None.

Description:

The union sensor__devctl__bkgrnd__u is used with the DCMD_SENSOR_BKGRND device command to enable/disable background mode for the sensor. By default, when the system is put in standby, all sensors are turned off, and no events are sent to clients.

If you enable background mode, the sensor will stay active when the system is in standby. This will reduce battery life.

Example:
sensor_devctl_bkgrnd_u sensorBkgrnd;
sensorBkgrnd.tx.enable = 1;  // 1 = enable, 0 = disable
result = devctl(fd, DCMD_SENSOR_BKGRND, &sensorBkgrnd,
                sizeof(sensorBkgrnd), NULL);
                
where:

result is EOK for success (or see errno return code descriptions).

Last modified: 2014-05-14



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

comments powered by Disqus