Tracking how you sleep through a smartphone or smartwatch is always handy, although doing so can even drain smartphones with the best battery life. However, now we may see many more apps utilizing the feature on Android, and it won't cause your device to be shut down by the time you wake up.
Google announced it is making its Sleep API publicly available to users and developers, meaning more third-party apps on Android devices can use its low-power sleep tracking mode.
- This new Android feature could change the way you send messages
- Android 12 leak reveals sought-after features and a polarizing new look
- Chrome for Android adopts this excellent tab feature — How it works
Announced through its Android Developers Blog, the Sleep API is an Android Activity Recognition API that simply offers information about the user’s sleep habits. However, its low-power sleep tracking is the real catch, meaning our smartphone battery won't be drained while we snooze. The feature could also come in handy for wearables that run on Wear OS.
Using the Sleep API, it can report "sleep confidence," which records data in 10-minute intervals, along with a daily sleep segment, which is reported after a wakeup is detected.
As for how it detects, API uses an "on-device" artificial intelligence that uses the device’s light and motion sensors as inputs. This is a hint that it could be used with wearables, too.
The announcement also states that permission must be granted for it to detect a user's sleep.
Developers will find the Sleep API ready to use via the latest version of Google Play Services, and it teamed up with Urbandroid who developed the alarm app Sleep As Android. The team stated that the new Sleep API will help its app track sleep "automatically in the most battery efficient way imaginable."