- Air Quality Index app is an app showcasing all the latest Jetpack Compose techniques implemented properly, and follows multi-module architecture.
- This app can be used as a reference or as a learning journey for Jetpack Compose.
- Android Application in Kotlin
- UI based on pure Jetpack Compose
- Uses AirVisual API to get the Air Quality Data
- Follows modern MVI Event Driven modular architecture
- This app showcases multi-module MVI Event Driven architecture with Jetpack libraries
- UI being fully made with Jetpack Compose
- HILT is used as the Dependency Injection framework
- All the popular Android libraries such as Retrofit, Coil, Coroutines, Flows are used as well
This app is based on an API to fetch the Air Quality data, so we need the key for that API. Also, to display Geographical maps, we have added support of 3 different map providers viz. Google Maps, Mappls (Map My India) and OpenStreetMaps (OSM). Using the Google & Mappls maps require their own keys as well. The entire process is as follows:
- Login / Create Account at the IQAir Dashboard
- Get your own AirVisual API key
- Put that key in
local.properties
file as:airVisualAPIKey=<YOUR KEY HERE>
- Also add the default Base URL in the same file as:
airVisualAPIBaseURL=https://api.airvisual.com/
- To get the Google maps key, you first need to create a project in the Google Maps Console
- Using this project, get a new API key to access Google maps (Don't forget to secure the API key by adding debug SHA-1 fingerprints)
- Add that key to the
local.properties
file as:MAPS_API_KEY=<YOUR KEY HERE>
- To get the Mappls maps key, you first need to create a project in the Mappls Maps Console
- Using this project, get a new API key, Client ID & Client Secret to access Mappls maps
- Add all the credentials to the
local.properties
file as follows:
mapMyIndiaKey=<YOUR KEY HERE>
mapMyIndiaClientId=<YOUR CLIENT ID HERE>
mapMyIndiaClientSecret=<YOUR CLIENT SECRET HERE>
Now Build and run the app as usual
- The UI for this app is created by Anamoul Rouf, as mentioned in Contra page and I highly appreciate the beauty and efforts behind this design.
- The Figma designs are available to use as - AirQI Air Quality & Weather App under CC BY 4.0 DEED