Google announces new API for apps to easily track your sleep patterns | Tech News

Google announces new API for apps to easily track your sleep patterns

Tracking sleep on Android devices in the past was extremely difficult, thanks to background battery drain and unreliable sensor information that varied between devices and apps.

By: HT TECH
| Updated on: Aug 21 2022, 15:16 IST
Google's new API will let apps track your sleep better
Google's new API will let apps track your sleep better (Pixabay)
Google's new API will let apps track your sleep better
Google's new API will let apps track your sleep better (Pixabay)

Tracking your sleep can provide useful insights for people who want to monitor sleeping and waking patterns or simply measure the quality and amount of rest they're getting every night. However, while tracking sleep via a wearable fitness tracker is quite easy, those doing so via their Android phones have a much tougher time because of unreliable performance and massive battery drain.

Google is now offering app developers a solution, in the form of its new Sleep API which it announced on its developer blog for the operating system. The company says it is an Activity Recognition API that will surface information about a users sleep - this can be integrated into all sorts of applications from alarm clocks to sleep tracking apps.

Read more: Google says it is fixing the ‘Ok Google' hotword for Wear OS users, months after it got reported

The company says that while existing solutions from developers involve using a combination of device sensors and other inputs to check if a user is asleep and awake, these are usually not consistent between apps and if a user has multiple apps installed, it could wreak havoc on your battery if they're running all night.

“The Sleep API is a simple API that centralizes sleep detection processing in a battery-efficient manner. For this launch, we are proud to collaborate with Urbandroid, the developer of the popular alarm app, Sleep As Android,” said Nick Grayson, Product Manager at Google. Sleep As Android is one of the oldest and well-known sleep tracking apps available on the Play Store.

Read more: Netflix testing sleep timer button on Android

Google is bundling the new Sleep API as part of the latest version of Google Play Services (February 18) and developers can make use of it right away - after they take a look at Googles Sleep API documentation. “This API is one step of our efforts to help our users get a better night's rest. We look forward to working more on this API and in this area in the future,” the company said.

Catch all the Latest Tech News, Mobile News, Laptop News, Gaming news, Wearables News , How To News, also keep up with us on Whatsapp channel,Twitter, Facebook, Google News, and Instagram. For our latest videos, subscribe to our YouTube channel.

First Published Date: 26 Feb, 14:27 IST
NEXT ARTICLE BEGINS