In the past, sleep monitoring on Android devices was very difficult due to batteries and sensor data that vary from device to app. Tracking your sleep may offer valuable information to people who want to track their sleep and waking habits or just evaluate the quality and rest of the night. But tracing sleep via a wearable tracker can be easy, because of unreliable output and huge battery drain, those monitoring sleep over their Android phone is a lot harder.
The new SLEAP API Google revealed in its developer blog for the operating system, now provides a solution to software developers. The company claims it is a behavior recognition-API that can be incorporated into all kinds of applications, including alarm clocks and sleep monitoring apps, providing information about a consumer's sleep.
The company says that, while developer solutions require a combination of system sensors and other inputs to verify that a customer sleeps and is awake, the solutions typically do not fit apps and if a user has a variety of apps installed, your battery may wreak havoc if they go overnight.
The Product manager Nick Greyson Told
'The Sleep API is a straightforward API that centralises battery-efficient sleep detection processing. We are proud to work with Urbandroid, the creator of Sleep As Android, the popular alarm app for the launch.
Sleep As Android is one of Play Store's oldest and most well-known sleep monitoring applications.
As part of Google Play Services' latest update (February 18), Google bundles the updated sleep API and developers can use this immediately – after viewing the Google Sleep API documentation. "This API is one of our moves towards helping users have a more peaceful night. We look forward to further working on this API and in the future in this area,"
said the company.