Battery optimizations

Typical battery life

Sleep as Android will use on average 20% of battery per typical night (7 to 8 hours) of sleep tracking. When noise recording is turned on, this might jump up to 30%.

While using sensor batching (which new high end phones do usually support), the battery usage is ~ 4% – 6%.

All measurements were made using Nexus 5, while sleep tracking in airplane mode.

Battery issues (Troubleshooting)

Do you suspect that Sleep as Android is draining a lot of battery?

If you look at battery statistics (in Android settings > Battery), you may sometimes notice high battery usage with Sleep as Android.

This is not caused by the sleep tracking directly. We hold a wakelock to keep the phone awake at night. While we do this, some badly written apps may still access the CPU and any consumption caused by those apps is accounted to Sleep as Android. To prevent high battery usage, kill any unnecessary services before starting sleep tracking (or reboot your phone).

To optimized Sleep tracking battery consumption consider turning off noise recording and snoring detection. Also consider turning on Settings – Battery optimized.

You may also consider tracking sleep time only without using any sensor data tracking. This method will make maximum use of Stand-by and thus consume minimum battery. This can be enabled after starting sleep tracking in Menu – Save battery.

We also strongly recommend to track with airplane mode on which will further reduce battery consumption.

Android M / 6.0 battery issues – doze mode

(authored 2015-11-17)

Doze mode which has been introduced in Android M largely interferes with sleep tracking and ironically causes higher battery usage. It is still an evolving issue, so changes (maybe even fundamental) are assumed. See posts from us and from Dianne Hackborn (Google):

Doze mode introduced issues that break sensor batching. We have a workaround for this. If you turn on Settings > Sleep tracking > Battery optimized, sensor batching will work. This workaround has one drawback – it will show wrong alarm time in the UI (always looks like it will start the next minute). But this is just a visual flaw and in reality alarms will sound at correct times.

Non-sensor batching mode was also greatly affected by the doze mode. But luckily it seems we found a bug which prevented us to correctly implement this feature. More details on the bug are available here. At the moment we are testing if the suggested workarounds will work well or whether we will need the REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission which should be called REQUEST_REMOVAL_FROM_PLAY_STORE_BY_GOOGLE as this is exactly what it does at the moment.

Share