Subscribe and Recognize to the User's Sleep Activity Demonstrates use of the Sleep API to recognize a user's sleep activity.
This is Java implementation of Kotlin example https://github.com/android/location-samples/tree/main/SleepSampleKotlin