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
main
folder (app -> src -> main
) - Create an
assets
folder - Create an
env
file using GitBash and the following command:
touch env
Paste 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
core
README (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
app
folder (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.env
file. YourFIREBASE_PROJECT_ID
should have been updated during step 2. - Open the Kotlin app on your phone and tap the
Notification Device Token
button at the top. Copy this token to the.env
file.