-
Android Studio 4.0 (installed on a Linux, Mac or Windows machine)
-
Android device with Minimum SDK version == 21 in developer mode with USB debugging enabled
-
USB cable (to connect Android device to your computer)
Clone the Sleep Detection GitHub repository to your computer to get the application.
git clone https://github.com/Ahwar/SleepDetection.git
To open the source code in Android Studio, open Android
Studio and select Open an existing project
, select the folder
where you cloned source code. for example: /home/Downloads/SleepDetection/
Select Build -> Make Project
and check that the project builds successfully.
You will need Android SDK configured in the settings. You'll need at least SDK version 21. The build.gradle
file will prompt you to download any missing
libraries.
`build.gradle` is configured to use TensorFlow Lite's build.
If you see a build error related to compatibility with Tensorflow Lite's Java API (for example, `method X is undefined for type Interpreter`), there has likely been a backwards compatible change to the API.
Connect the Android device to the computer and be sure to approve any ADB
permission prompts that appear on your phone. Select Run -> Run app.
Select
the deployment target in the connected devices to the device on which the app
will be installed. This will install the app on the device.
To test the app, open the app called Sleep Detection
on your device. When you run
the app the first time, the app will request permission to access the camera.