New Sleep API now available, ready for low-power sleep tracking

Sleep isn’t for the week. It’s actually a necessity and for many people, it’s more of a luxury. We know people who actually care about the hours of sleep they get. Sleep is important and having rest matters to anyone’s health and fitness. There are sleep tracking devices that help and good thing that in this day and age, we can take advantage of all the tools available to help us get better sleep. There are plenty of developers that have already ventured in this category—creating sleep-related apps.

No, we’re not just talking about counting your sleeping hours. The Android development team has worked on a new API. The Sleep API is now available for public consumption. If you’re a developer, you may want to check on this and see what else can you do.

Sleep API Benefits

The Sleep API can help people to learn more about their sleep and get helpful insights. If data on sleep habits are ready, then one can be informed about what to do. Sleep is a big factor in mental health and concentration so it is important that you know more about your habits.

Officially, Sleep API is an Android Activity Recognition API. It gathers and provides information about your sleep. Such can be used on phone features and apps like Bedtime mode in the Clock app.

As described, Sleep API can look into your ‘sleep confidence’ and ‘daily sleep segment’. The information gathered can be reported to the user regularly at a set interval or when you wake up. The Sleep API takes advantage of an on-device artificial intelligence model. Inputs used can be a device’s light and motion sensors. Make sure the Physical Activity Recognition runtime permission is granted so the device and app can fully detect sleep.

Having the Sleep API makes things easier for the developers. It makes sleep detection processing more power-efficient (low-powered). Google has teamed up with Urbandroid to work on the Sleep As Android alarm app. The app uses the Sleep API, allowing the app to do these things: track sleep duration, phases, regularity, and snoring among others.

Android Low-Power Sleep Tracking Logo

To use the Sleep API, you may get the newest version of Google Play Services. It’s now available for developers. Rest assured this API can help you and me to have better sleep as long as applied properly.

.