MobileNews

Google launches Android Sleep API to detect snoozing, waking up; available to apps now

Android has long offered an Activity Recognition API that processes device sensor data with machine learning models in a battery-efficient manner. Google is now offering an Android Sleep API to allow for the creation of more wellness apps.

So much of what we do relies on a good night’s rest. Our phones have become great tools for making more informed decisions about our sleep. And by being informed about sleep habits, people can make better decisions throughout the day about sleep, which affects things like concentration and mental health.

Part of the broader Android Activity Recognition API, Google’s new Sleep API analyze your phone’s light and motion sensors with an on-device AI model to generate two pieces 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

In offering this new tool, Google wants to save developers from having to “spend valuable engineering time to combine sensor signals to determine when the user has started or ended activities like sleep,” noting how:

These detection algorithms are inconsistent between apps and when multiple apps independently and continuously check for changes in user activity, battery life suffers.

End users will have to grant the Physical Activity Recognition runtime permission before apps can get access to this data.

Google touts features similar to the Bedtime mode in Android’s Clock app and partnered with the Sleep As Android app for today’s launch:

The new Sleep API gives us a fantastic opportunity to track it automatically in the most battery efficient way imaginable.

Sleep As Android developers

Available with the latest version of Google Play Services on Android 10 and later, the Sleep API can be used by developers now. Looking forward, Google is “working more on this API and in this area in the future.”


Check out the latest Samsung phones at great prices from Gizmofashion – our recommended retail partner.


Author: Abner Li
Source: 9TO5Google

Related posts
GamingNews

A Week on From Its Company Reshuffle, Ubisoft Has Announced a Just Dance+ Price Increase

GamingNews

'When Did It Become Trendy to Hate on a New Game?' — as Highguard Struggles to Win Over the Internet, Video Game Developers Come to Its Defense

GamingNews

Capcom Drops Monster Hunter Wilds Patch That Aims to Improve Optimization for 'Steam-Specific Processes' and Address Long-Standing PC Issues

CryptoNews

Robert Kiyosaki Regrets Selling Bitcoin, Says Window Open to Buy More BTC

Sign up for our Newsletter and
stay informed!