SDK Services are started in high power mode by default to provide the best location accuracy. With high accuracy also comes higher battery consumption, which might be too much for application running in the background for extended periods of time (more than one hour). The battery consumption can be considerably reduced by setting the power mode to low, at the expense of slightly reduced accuracy: the returned position is less accurate and smooth than in high accuracy mode (but still quite good), as it switches off all sensors except the BLE sensor.
To change the power mode to low (resp. high to change back), proceed as follows:
Android
- serviceHandle.setPowerMode(TPOWERMODE.LOW) /*resp. TPOWERMODE.HIGH*/
iOS
- [serviceHandle setPowerMode:DBTPOWERMODE_LOW] /*resp. DBTPOWERMODE_HIGH*/
BatterySaver Mode
This mode is added in version 4.11.12 and currently only used on Android and wear OS.
Activating this mode allows NAOSDK to consume less battery for background usage
This is a new power mode ofTPOWERMODE
/** accurate power mode */ HIGH, /** low-power mode */ LOW, /** Battery Saver mode */ BATTERYSAVER,
Activation of this mode releases the processor’s wake-up lock when the user is detected as not moving.
Android
- serviceHandle.setPowerMode(TPOWERMODE.BATTERYSAVER
)