Android Sleep Tracker will soon use less power and have fewer random problems

Android apps that have to work in the background, like drag trackers, have had a very hard time. They suffer from inconsistent and unreliable background app limitations in different Android versions, which can interfere with how the apps work on a very fundamental level. Fortunately, Google is implementing a brand new Sleep API built right into Google Play Services. It sounds like it should solve the problem – at least for sleep programs.

The API is built into the existing activity recognition package, which (if you allow it) can automatically retrieve the things you do from the device sensors. This is how things like Google Fit can determine if you are cycling, walking or driving while watching your physical activity. Google already uses the Sleep API internally for the Google Clock sleep time mode.

What does this change mean for you then – is an API not a technical thing that you as an end user do not have to worry about? It can actually have a measurable impact with some great benefits.

Look, previously these sleep tracking programs had to run their own tracking algorithms, with device sensors with their own trained models and triggers to try to estimate when you are sleeping. That means they are constantly running in the background to do those things. As I said earlier, some smartphone makers are customizing Android themselves in a way that completely breaks this behavior, and Google has already said that it will not really do anything to fix it. But this API means they will not have to anymore; it’s all just built right in. Smartphone Manufacturers Will Not Work With How Play Services Work Because It’s Something Google Can Do actually get upset so developers can rely on this new API to work.

It also means that sleep tracking apps will make less dive into your battery life going forward. If Play Services does all these things in the background, it’s unnecessary to run an app in the background and do the same things at the same time. It’s simpler and more efficient. Since many of these apps need the phone on your bed next to you to work, and because it can be uncomfortable and difficult to turn it on this way, it means your phone will last so much longer until the morning.

There’s one last reason why we think this will make a difference: Urbandroid, the maker of Sleep as Android, is involved. This is a big problem, because Urbandroid is also behind Don’t Kill My App !, and they have been following the effect that ‘optimizations’ of the manufacturer background app have on developers. If it’s involved, chances are it’s a good thing. We contacted Urbandroid separately for more information and also the news about them, although a statement was included with Google’s announcement:

Sleep as Android is a Swiss army to get a better night’s rest. It follows sleep duration, regularity, phases, snoring, and more. Sleep duration is one of the most important parameters to ensure a good night’s rest. The new Sleep API offers us a fantastic opportunity to automatically detect it in the most battery-efficient way imaginable.

It remains to be seen how Google’s new Sleep API will actually perform. Many of these sleep programs consider their tracking methods to be a trade secret, which is often a benefit that is advertised their app has about someone else’s. Still, I’m optimistic that Google’s API should deliver high quality data to developers. And for our consumers, this means better sleep programs with better battery life and less unexplained problems.

Source