Google launches an API for sleep tracking on Android. To track your sleep, you don’t need an activity bracelet. We can measure sleep from our Android phone with applications that can now spend less battery.
After launching more than two years ago the [Activity API](Activity recognition API), Google now launches the new sleep API, a new feature that developers will be able to use in their applications to detect when we are sleeping more efficiently.
Google’s sleep API for Android
Google reports that this new API is very important for year-tracking app developers, as they will no longer have to spend valuable engineering time combining sensor signals to detect when the user has started or finished sleeping, with detection algorithms that are inconsistent between apps and also independently and continuously check for changes in user activity. When multiple apps are trying to figure out whether we are sleeping or awake battery life is affected.
With the Sleep API, developed with the collaboration of the creator of Sleep As Android, the processing of sleep detection is centralized in a single API, so that applications that make use of this API will not waste more battery, since Google Play Services will calculate for all applications our sleep activity. Not like now, that each application tries to detect our state.
Google already uses in several of its applications this sleep API, as in the Clock application that allows us to track our sleep and the activity we do in hours when we should be sleeping.