[ad_1]
Android apps that have to run in the background like sleep trackers have had a hard time. They suffer from inconsistent and unreliable background app limitations in different versions of Android, which can interfere with the functioning of apps at a very basic level. Fortunately, Google is rolling out a brand new Sleep API built right into Google Play services. It looks like it should fix that – at least, for sleep tracking apps, anyway.
The API is integrated with the existing activity recognition suite, which (if you allow it) can automatically detect things you do based on the device’s sensors. This is how things like Google Fit can determine whether you’re cycling, walking, or driving when it comes to tracking physical activity. Google already uses the Sleep API internally for Google Clock’s bedtime mode.
So what does this change mean to you? Isn’t an API a technical thing that you don’t have to worry about as an end user? Well, it can actually have a measurable impact with big benefits.
See, previously these sleep tracking apps had to run their own detection algorithms, looking at the device’s sensors with their own trained patterns and triggers to try and estimate when you are sleeping. This means that they are constantly running in the background to do these things. As I said earlier, some smartphone makers are tweaking Android itself in a way that breaks this behavior squarely, and Google has already said that it really isn’t doing anything to address this issue. But this API means they won’t have to do it anymore; everything is simply integrated. Smartphone makers aren’t going to mess with how Play Services work, because that’s something Google could Actually you want some, so developers can rely on this new API to work.
It also means that sleep tracker apps will reduce your battery life. While Play Services is already doing all of this in the background, having an app running in the background and doing the same things in parallel is redundant and wastes energy. It’s simpler and more efficient. Since a lot of these apps need the phone on your bed next to you to work, and since it can be inconvenient and prone to plugging them in that way, that means your phone is much more likely to last until morning.
There’s one final reason we think it will make a difference: Urbandroid, the maker of Sleep as Android, is involved. This is a big deal because Urbandroid is also behind Don’t Kill My App !, and they’ve been tracking the effect of the manufacturer’s background app “optimizations” on the developers. If they are involved, chances are the change is a good thing. We contacted Urbandroid separately for more information and their take on the news, although a statement was included with Google’s announcement:
Sleep as Android is a Swiss army knife for better sleep. It tracks sleep duration, regularity, phases, snoring, etc. Sleep duration is one of the most important parameters to monitor to ensure a good night’s sleep. The new Sleep API gives us a fantastic opportunity to automatically track it in the most battery efficient way possible.
It remains to be seen how Google’s new Sleep API will actually work in practice. Many of these sleep tracking apps consider their detection methods a trade secret, often an advertised benefit that their the app has on someone else. Still, I’m optimistic that Google’s API should deliver high-quality data to developers. And for us consumers, that means better sleep tracker apps with better battery life and fewer unexplained issues.
[ad_2]
Source link