This solution aims to utilize Retrofit, MVVM Architecture to show all the tracks fetched using enviroCar api for a particular user. Then all the tracks are shown to user in Recycler View, on clicking the particular item of recycler view it takes user to another activity where the track is rendered on the map using MapLibre Library. The path of the track is shown using red line and the markers are used to illustrate starting and ending points. On clicking a particular marker a pop-up is shown which displays the timestamp.
Tile server used for this assignment: https://docs.maptiler.com/maplibre-gl-native-android/
WhatsApp.Video.2024-03-23.at.20.29.03_422ab960.mp4
- Import the project through Android Studio or clone it
- Change the
x_user
andx_token
instring.xml
file with your own enviroCar credentialsapp/src/main/res/values/strings.xml
- Change
map_tiler_api_key
with your own API KEY instrings.xml
file - Yippee! You have hit the mark! 🎯
You can download apk file from here.
implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0")
implementation("org.maplibre.gl:android-sdk:10.0.2")
implementation("androidx.appcompat:appcompat:1.6.1")