Google Announces New API For Apps To Track Sleep Patterns

Tracking sleep on Android devices in the past was extremely difficult with unreliable sensor information that varies between devices and apps.

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.

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.

Also Read:

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.

Latest Posts

Related Articles