Solaris is a case study Android application that demonstrates how to fetch location data and enrich it with related information from multiple sources.
It integrates points of interest (POI) (AI-generated using Firebase AI Logic), weather, and other contextual details to showcase modern Android development practices.
- 🛰️ Real-time location tracking with Google Play Services
- 💻 AI-generated data provided by Firebase AI Logic (Gemini models)
- 🗂️ Offline-first architecture with local data storage and background syncing
- ⏳ Persistent background work handled by WorkManager (DelegatingWorker + Hilt) for data syncing
- 🎨 Modern UI built with Jetpack Compose and Material 3, using Coil for images and Lottie for animations
- 🌐 Networking via Retrofit and OkHttp
- 🔒 Runtime permissions handled via Accompanist Permissions
- 🏗 Modular architecture with Hilt for dependency injection
- MVVM Architecture - Separation of concerns and testable code.
- Kotlin - Concise and multiplatform programming language by JetBrains.
- Jetpack Compose - Modern declarative UI.
- Navigation 3 - Navigation library designed to work with Compose.
- Kotlin Serialization - serialization.
- Hilt - Dependency Injection.
- KSP - Annotation processing.
- Timber - Logging library.
- Firebase AI - Generative AI models from Google.
- Retrofit - Making network requests.
- OkHttp - Custom HTTP client with logging interceptor (shared with Retrofit & Coil).
- Room - Local database.
- DataStore - Preferences storage.
- Fused Location Provider - Device Location API.
- WorkManager - API for persistent background work.
- Coil - Async image loading.
- Lottie - Animations.
- Accompanist Permissions - Runtime permissions handling.
- Splash Screen API - Launch the app with animation.
- Search Location - The user searches for a location by name or through device coordinates.
- Sync Related Data -
SyncRelatedDataUseCase
launches coroutines to sync weather, POI, and other related data
from their dedicated repositories in parallel, emitting real-time sync status updates. - Store & Cache - Data is cached locally using Room for offline access.
- Display Results -
GetLocationsWithRelatedDataUseCase
aggregates the data and exposes it to the UI asLocationWithRelatedData
. - Background Sync - WorkManager ensures data stays up-to-date by running periodic syncs in the background.
Note
All APIs used in this project are free to use.
-
Clone the repository
-
Set up MeteoSource API key (for location and weather data)
- Sign up at Meteosource
- Place your API key in the root-level
apikeys.properties
file:METEOSOURCE_API_KEY=<YOUR_API_KEY>
During the build process,
if apikeys.properties file doesn't exist, the network module’s Gradle script will automatically generate it with the required field. -
Set up Firebase AI Logic (for AI-generated POI data)
- Follow Get started with the Gemini API to create a Firebase project and enable Firebase AI Logic.
Be sure to placegoogle-services.json
in the app module:app/google-services.json
.
Enable AppCheck in your Firebase project to prevent API abuse.
- Follow Get started with the Gemini API to create a Firebase project and enable Firebase AI Logic.
-
Run the app
Build and run the app on an Android device or emulator.
Solaris is licensed under the Apache License 2.0. See the LICENSE
file for
details.
This project is licensed under the MIT License.