Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Latest commit

 

History

History

SleepSampleKotlin

Subscribe and Recognize to the User's Sleep Activity

Demonstrates use of the Sleep API to recognize a user's sleep activity.

Introduction

Demonstrates use of the Sleep API to recognize a user's current sleep activity.

Users can request activity updates by pressing the "Subscribe to Sleep Data" button, and stop receiving updates using the "Unsubscribe to Sleep Data" button.

Note: This sample targets the preferred minimum API level of 29.

Prerequisites

  • Android API Level >v29
  • Android Build Tools >v21
  • Google (Support) Repository

Getting Started

This sample uses the Gradle build system. To build this project, use the "gradlew build" command or use "Import Project" in Android Studio.

Support

If you've found an error in this sample, please file an issue: https://github.com/android/location-samples/issues

Patches are encouraged, and may be submitted according to the instructions in CONTRIBUTING.md.