Sound safari is a mobile application that allows users to create a customised GPS based audio tour. A user signs up and saves locations to visit, once they enter a geofenced location an audio prompt plays with the details about the location they are visiting.
- Kotlin
- Jetpack Compose
- Android Studio
- Git/GitHub
- Firebase Realtime Database
- Firebase Authentication
- Google Authentication
- Google Maps API
- Android text to speech
- Tripadvisor api
- Timber for logging
- CRUD functionality for locations, locations are persisted to Firebase Realtime Database.
- User authentication using Firebase Authentication and Google Authentication. A user can choose whether to sign authenticate using their google account or skip and an anonymous user will be created for them in firestore. When they authenticate fully later the user data will be merged.
- App navigation via Bottom bar navigation.
- Map functionality to allow the user to see each individual location and also to show all saved locations together on one map. This allows the user to see possible destinations and see all selected destinations in relation to each other. The map functionality makes use of the Google Maps API.
- Swipe left to delete support for saved locations.
- Night mode functionality.
- A foreground service with persistent notification is used to poll the GPS location of the user for triggering the audio TTS when entering the geofence. This currently polls every second for testing within the emulator but can be adjusted for production version.
- A boot receiver service is used to start the foreground service when the device is restarted.
- A background receiver to receive the geofence event and start the TTS event.
- Offline cache as part of Coil, Retrofit and Firestore.
Light Mode | Dark Mode |
---|---|
Light Mode | Dark Mode |
---|---|
Light Mode | Dark Mode |
---|---|
Light Mode | Dark Mode |
---|---|
Light Mode | Dark Mode |
---|---|
Light Mode | Dark Mode |
---|---|
Light Mode | Dark Mode |
---|---|
Light Mode | Dark Mode |
---|---|
The app is designed to be as easy to use as possible and uses standard icons to follow industry norms. Text is used on buttons where icons were not enough to convey functionality. The colours scheme is kept simple to ensure ease of use in either light or dark mode.
I tried followed The MVVM Design Pattern where necessary. I separated the program logic from the UI functionality once the logic became complicated. Pages such as the settings page aren't separated as the logic is small. I also tried to follow a clean architecture approach ensuring that the code is neat, with an easy to understand naming convention and formatted correctly.
Git has 2 branches, Main and dev, with dev storing the work as changes were made and then pull requests created from dev to main for each tagged release. Renovate bot was used to ensure dependencies are kept up to date. A github action runs on every push/pull to main which runs ./gradelw test
and builds the apk. An example of the built artifact is https://github.com/CathalOConnorRH/mobile_app_dev/actions/runs/8909150662
This project has taken the longest of any projects so far. A lot of reference material and articles are out of date for Jetpack Compose even if written within the last 12 months. This made figuring out the correct usages tricky in some places and means functionality is not exactly what I would have if it were an actual commercial application. I will update the functionality in future versions to address the issues as I learn more.
As it currently stands the app works and is usable in the real world. With the addition of additional sources some of the information could be better tailored to the app. One example is the inaccuracy of GPS location data for some locations in tripadvisor. If I had a custom backend to host the data it would be more accurate or at least controllable. There are also limitations of the tripadvisor api that only returns a limited number of results.
Online articles and tutorials used in the process of developing this app.
- How to Integrate Firebase Firestore with Kotlin and Use it in Android Apps
- Android Custom Dialog using jetpack compose | by MaKB | Medium
- API Calls with Retrofit in Android Kotlin: A Comprehensive Guide | by Kuldeep Singh Rai | Medium
- Work with Firebase Realtime database lists | by PRANAY PATEL | Medium
- Create and monitor geofences | Sensors and location | Android Developers
- Understanding and Using Services in Android: Background & Foreground Services | by Codeible | Medium
- dheeraj-bhadoria/Compose-MVVM-Retrofit-ViewMode-LiveData-Complete-Example-Android-App: Compose MVVM Retrofit ViewMode LiveData Complete Example Android App. How to implement MVVM with Retrofit in compose based android app.
- Lists using LazyColumn in Jetpack Compose | by Maryam Alhuthayfi | Medium
- Jetpack Compose Android App with MVVM Architecture and Retrofit - API Integration | by Dheeraj Singh Bhadoria | Medium
- Compose-MVVM-Retrofit-ViewMode-LiveData-Complete-Example-Android-App/app/src/main/java/com/dheeraj/composemvvm/view/CreditCardScreen.kt at main · dheeraj-bhadoria/Compose-MVVM-Retrofit-ViewMode-LiveData-Complete-Example-Android-App
- Android Compose Tutorial - Profile Card | by Ken Ruiz Inoue | Deuk | Medium
- Building an Expandable Credit Card Information Card in Jetpack Compose | by Dheeraj Singh Bhadoria | Medium
- How to reuse data for previews in Jetpack Compose | by Juan Guillermo Gómez Torres | Google Developer Experts | Medium
- Cards En Jetpack Compose - Develou
- jamesreve/android-jetpack-compose: Ejemplos de la guía de Jetpack Compose de Develou
- Send simple data to other apps | Android Developers
- Jetpack Compose Add a Share Button to your App | by Chase | Medium
- Card | Jetpack Compose | Android Developers
- Navigating with Jetpack Compose. In this article we are going to learn… | by Jayant Kumar🇮🇳 | Medium
- Navigation and the back stack | Android Developers
- Navigation with Compose | Jetpack Compose | Android Developers
- android - How can i get the response url using Retrofit2 in Kotlin? - Stack Overflow
- Mastering Data Sharing Between Screens with Jetpack Compose: 5 Key Techniques
- Coil Compose — Loading and Caching Images in Compose | by Sudhanshu Kumar | Medium
- Android: How do I get string from resources using its name? - Stack Overflow
- Using String Resources in a ViewModel | by Margin KS | Medium
- Basic Android Compose - User Rating Bar | by Ken Ruiz Inoue | Deuk | Medium
- Jetpack Compose for Maps | Darryl Bayliss
- Jetpack compose — Load Images from URL | by Csmworks | Medium
- Get data with Cloud Firestore | Firebase
- Improve your code with lint checks | Android Studio | Android Developers
- landomen/ForegroundService14Sample: Simple sample app demostrating how to use Foreground Services on Android 14.
- How to authenticate to Firebase using Google One Tap in Jetpack Compose? | by Alex Mamo | Firebase Developers | Medium
- Firebase Authentication in Jetpack Compose: Part 1 - Anonymous Authentication | Medium
- Bottom AppBar with Jetpack Compose | by Abhishek Pathak | Medium
- Why Timber for logging and how to implement it in Android? | by Mohd Raghib | Medium
- How to create Toast message in Jetpack Compose | Android? | by Sriyank Siddhartha | Smartherd | Medium
- How to pass object in navigation in jetpack compose? - Stack Overflow
- Request Permissions in Android with Jetpack Compose | Medium
- Google Maps in Jetpack Compose | Make Android
- Jetpack Compose for Maps | Darryl Bayliss
- How to Request Location Permissions in Jetpack Compose
- Android/Kotlin/Jetpack Compose: Popup Window | by Itsuki | Medium
- Swipeable Component with Jetpack Compose | swipe to delete or archive | by Ahmed Khater | Medium
- ExpandableCardCompose/app/src/main/java/com/drsync/expandablecardcompose/MainActivity.kt at master · bennyfajri/ExpandableCardCompose
- Text-to-Speech-And-Speech-to-Text-App/app/src/main/java/com/example/texttospeechspeechtotextapp/MainActivity.kt at master · Coding-Meet/Text-to-Speech-And-Speech-to-Text-App
- Android-Kotlin-Text-To-Speech-Example/app/src/main/java/com/robsonribeiroft/texttospeechexemple/TTS.kt at master · robsonribeiroft/Android-Kotlin-Text-To-Speech-Example
- Geofencing for boost your digital campaign | by Veronica Putri Anggraini | Medium