This guide walks you through setting up the Kotlin app to receive notifications and view all alarm reports.
Important: Be sure to set up your local files (Local System Setup) and the Django project (Django Setup) before setting up the app.
- Java 17
- Android Studio
- (Recommended) GitBash (Some bash commands will look different if you are not using GitBash)
- Navigate to the
mainfolder (app -> src -> main) - Create an
assetsfolder - Create an
envfile using GitBash and the following command:
touch envPaste the following into your env file:
BASE_URL=YOUR_PROJECT_URL
API_KEY=YOUR_API_KEY
Both values can be found in your Django .env file. For the BASE_URL, you do not need the API endpoint. It should look something like this: https://yourproject.pythonanywhere.com/
- If you did not complete step 6 in the
coreREADME (Local System Setup), you should do that now. - Once you have set up a Firebase project, you can download the Google Services file by following (these steps)
- Move the downloaded file to the
appfolder (the same folder asbuild,libs,src)
- Open the project in Android Studio
- Connect your phone
- Run the application on your phone
- You need to update the last field (
NOTIFICATION_DEVICE_TOKEN) in the.envfile. YourFIREBASE_PROJECT_IDshould have been updated during step 2. - Open the Kotlin app on your phone and tap the
Notification Device Tokenbutton at the top. Copy this token to the.envfile.