Android Introduces Sleep Tracking API to Reduce Power Consumption

Last updated June 14, 2021
Written by:
Bill Toulas
Bill Toulas
Cybersecurity Journalist

Tracking your sleep with a smartphone is nothing new, and for a significant portion of the Android userbase, this is a core function of their devices. Sleep specialists maintain that sleep interruption factors need to be identified in order to be alleviated before they cause disorders.

For the same reasons, sleep apnea and insomnia that can cause deprivation, narcolepsy, mood swings, memory and concentration problems have to be dealt with promptly - and sleep tracking apps are an amazing way to identify them. And finally, these apps are awesome when it comes to “adaptive alarms,” waking users up at the right time (sleep cycle point), causing the littlest possible grogginess.

The main problem and the very reason why many people avoid using these apps is that they need a lot of energy to operate, so typically, smartphone batteries are empty in the morning. Not many users are happy with the idea of having a drained battery at the start of the day, and this has remained an issue for many years now, practically since the first appearance of sleep tracking apps in the market.

To address this problem, Google is finally introducing a low-power Sleep API, part of the Android Activity Recognition, so the field is about to change. The new API will stop relying on a constant feed of data from all sensors and instead act smarter. For example, the sleep status checks that will assign a confidence score will be carried in intervals going up to 10 minutes max.

Also, the API will check the surrounding brightness to figure out if the lights are on or not, which is a lot more frugal than tapping on the motion sensor and accelerometer data. Of course, these sensors will still be used by tracking apps, but more selectively and intermittently.

Developers of these apps can now take advantage of the new Sleep API and make their detection algorithms part of a central sleep tracking system which is a component of the Android OS. This way, their apps won’t cause the excessive battery drain of the past.

Google says its collaboration with “Sleep as Android” has helped them test and confirm the new API, so if you want to see how well it works, you may go ahead and test it through the particular app. Of course, there will be many apps in the field that will follow with relevant updates shortly, so if you’re using something else, you just need to be patient for a while.



For a better user experience we recommend using a more modern browser. We support the latest version of the following browsers: For a better user experience we recommend using the latest version of the following browsers: