Google has introduced a new sleep API that will give developers accurate information about a user’s sleep, resulting in advanced sleep tracking apps. It is part of Google’s Android Activity Recognition API and is available for developers to use as part of the latest version of Google Play Services.
Before we dive into all of that, let’s breakdown what an API is and what it does. API is an acronym for Application Programming Interface, which is a software intermediary that allows two applications to communicate with each other.
For example, Android has long offered the Activity Recognition API which can automatically pick up on things you are doing based on device sensors. The API then communicates with apps like Google fit that can determine whether you are biking or walking when it comes to tracking physical activity.
Related; Google Play store can now let you share apps via Nearby Share; here’s how
Previously, developers created sleep-tracking apps that would run on their detection algorithms, which meant watching device sensors and triggers to try and estimate when you’re sleeping. The obstacle was, sleep-tracking apps run in the background and when multiple apps independently and continuously check for user activity change, battery life suffers.
For Google’s new Sleep API, however, apps won’t need to run on their detection algorithms since the API does that for them. It analyzes your phone’s light and motion sensors to generate two sets of information;
- A “sleep confidence,” which is reported at a regular interval (up to 10 minutes)
- A daily sleep segment, which is reported after a wakeup is detected
It remains uncertain how Google’s Sleep API will work, but it should deliver high-quality information to developers. And for us consumers, better sleep-tracking apps that offer better battery life.
Next; Here’s a look at Android’s new features after their latest update
Alfred Gitonga is a passionate tech news writer with a deep interest in smartphones and related technologies. He is a staff writer at Mobitrends.co.ke.