Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/devrath/Distance-Tracker

πŸ—ΊοΈ Tacking the user distance traveled and time taken using the google maps API
https://github.com/devrath/Distance-Tracker

android android-location clean-architecture clean-architecture-android clean-code dependencyinjection foreground-service fusedlocationapi google-maps hilt kotlin kotlin-android location-permissions mvvm mvvm-architecture usecase

Last synced: 3 months ago
JSON representation

πŸ—ΊοΈ Tacking the user distance traveled and time taken using the google maps API

Awesome Lists containing this project

README

        

![cover](https://github.com/devrath/Distance-Tracker/blob/main/Assets/Banner/banner.jpeg)

# Distance-Tracker πŸ§žβ€
[![Android Best practices](https://img.shields.io/badge/Android-best--practices-red)](https://www.android.com/intl/en_in/what-is-android/)
[![Kotlin](https://img.shields.io/badge/Kotlin-1.6.10-brightgreen)](https://kotlinlang.org/)
[![Coroutines](https://img.shields.io/badge/Coroutines-1.6.0-red)](https://kotlinlang.org/docs/reference/coroutines-overview.html)
[![DaggerHilt](https://img.shields.io/badge/DaggerHilt-2.40-blue)](https://developer.android.com/training/dependency-injection/hilt-android)
[![Firebase](https://img.shields.io/badge/Firebase-30.2.0-blueviolet)](https://firebase.google.com/)
[![Timber](https://img.shields.io/badge/Timber-5.0.1-blue)](https://github.com/JakeWharton/timber)
[![Orhanobut](https://img.shields.io/badge/orhanobut-2.2.0-lightgrey)](https://github.com/orhanobut/logger)
[![Google Material](https://img.shields.io/badge/Google%20Material-1.4.0-3D3635)](https://material.io/develop/android/docs/getting-started)
[![Crashlytics](https://img.shields.io/badge/Crashlytics-2.9.1-3B9C9C)](https://firebase.google.com/docs/crashlytics)
[![Fused Location Service](https://img.shields.io/badge/Location-fused--location--service-orange)](https://developers.google.com/location-context/fused-location-provider)
[![OkHttp](https://img.shields.io/static/v1?label=Okhttp&message=4.10.0&color=red)](https://square.github.io/okhttp/)
[![OkHttp-interceptors](https://img.shields.io/static/v1?label=Okhttp-interceptors&message=4.10.0&color=brightgreen)](https://square.github.io/okhttp/features/interceptors/)
[![Kotlin-Serialization](https://img.shields.io/static/v1?label=Okhttp&message=1.7.20&color=blue)](https://github.com/Kotlin/kotlinx.serialization)

## **`π™°πš›πšŒπš‘πš’πšπšŽπšŒπšπšžπš›πšŽ`** 🎈

### `π™±πš•πš˜πšŒπš” π™³πš’πšŠπšπš›πšŠπš–`


dev_logo

### `π™Όπš…πš…π™Ό-π™°πš™πš™πš›πš˜πšŠπšŒπš‘`


dev_logo

#### **`πšƒπš‘πšŽ πšŠπš›πšŒπš‘πš’πšπšŽπšŒπšπšžπš›πšŽ 𝚘𝚏 πšπš‘πšŽ πšŠπš™πš™πš•πš’πšŒπšŠπšπš’πš˜πš— πš’πšœ πš‹πšŠπšœπšŽπš, πšŠπš™πš™πš•πš’ πšŠπš—πš πšœπšπš›πš’πšŒπšπš•πš’ πšŒπš˜πš–πš™πš•πš’πšŽπšœ πš πš’πšπš‘ πšŽπšŠπšŒπš‘ 𝚘𝚏 πšπš‘πšŽ πšπš˜πš•πš•πš˜πš πš’πš—πš 𝟻 πš™πš˜πš’πš—πšπšœ`** 🐿️

| `SlNo` | `Description` |
| ------ | ------------- |
| `1` | A single-activity architecture, using the [Navigation component](https://developer.android.com/guide/navigation/navigation-getting-started) to manage fragment operations. |
| `2` | [Android architecture components](https://developer.android.com/topic/libraries/architecture/), part of Android Jetpack for give to project a robust design, testable and maintainable. |
| `3` | Pattern [Model-View-ViewModel](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel) (MVVM) facilitating a [separation](https://en.wikipedia.org/wiki/Separation_of_concerns) of development of the graphical user interface. |
| `4` | [S.O.L.I.D](https://en.wikipedia.org/wiki/SOLID) design principles intended to make software designs more understandable, flexible and maintainable. |
| `5` | [Modular app architecture](https://proandroiddev.com/build-a-modular-android-app-architecture-25342d99de82) allows to be developed features in isolation, independently from other features. |

#### **`π™Όπš˜πšπšžπš•πšŠπš›πš’πš£πšŠπšπš’πš˜πš— πšœπšπš›πšŠπšπšŽπšπš’πšŽπšœ 𝚞𝚜𝚎𝚍`** 🦨

| **`Name`** | **`Description`** |
| ---------- | ----------------- |
| **`Reusability`** | Keeping code reusable so same code snippets are utilized in different parts of the code |
| **`Parallel Building`** | Modular approach reduces the build time |
| **`Strict visibility control`** | Modules restrict to expose dedicated components and access to other layers, so it prevents they're being used outside the module |
| **`Decentralized focusing`** | Each developer team can assign their dedicated module and they can focus on their own modules |

## **`π™³πšŽπš–πš˜ 𝚘𝚏 πšπš‘πšŽ πš™πš›πš˜πš“πšŽπšŒπš`** πŸ’‘
This application is used to track the user distance traveled and the time taken to travel the distance.

| **`Features with Description`** | **`Wiki`** | **`Demo`** |
| ------------------------------- | ---------- | ---------- |
| **`Location-Tracking`** : With this feature users can start the tracking from a source and travel to destination. Then measure the `distance travelled` and `time taken` for the journey with a visual display on the map using hte `polyline`. Users will be able to `track the distance` even when the app is not in the foreground or background using a `foreground service`. | [Documentation](https://github.com/devrath/Distance-Tracker/wiki/%F0%9D%99%BB%F0%9D%9A%98%F0%9D%9A%8C%F0%9D%9A%8A%F0%9D%9A%9D%F0%9D%9A%92%F0%9D%9A%98%F0%9D%9A%97-%F0%9D%9A%83%F0%9D%9A%9B%F0%9D%9A%8A%F0%9D%9A%8C%F0%9D%9A%94%F0%9D%9A%92%F0%9D%9A%97%F0%9D%9A%90-%F0%9F%A7%AD) | |
| [**`Splash API`**](https://developer.android.com/develop/ui/views/launch/splash-screen): With this API there is no need of creating a separate activity to customise the splash screen. The system will automatically create one for you. It also allows you to have a new launch animation for your apps and ability to perform a long running operation. | | |
| [**`In-App updates`**](https://developer.android.com/guide/playcore/in-app-updates): Using this API, users will be able to update the application in an eligant way thus keeping the app always up-to-date. | [Documentation](https://developer.android.com/guide/playcore/in-app-updates/kotlin-java) | |
| [**`App-reviews`**](https://developer.android.com/guide/playcore/in-app-review): This API lets you prompt users to submit `Play Store ratings` and `reviews` without the inconvenience of leaving your app. | | |
| **`Network Observer`**: This is used to observe the network change if connected/disconnected to user | [Documentation](https://github.com/devrath/droid-network-observer) | |
| **`Toggling dark/light mode from app`**: This application supports system dark/light mode along with it user can force the toggling of modes in android | [Documentation](https://github.com/devrath/android-congenial-fortnight-darktheme) | |
| **`Changing the map style`**: We can dynamically change the map style of android to provide a different user experience | | |

## **`Useful learnings`** πŸ’‘
* [_**`Publisher subscriber pattern using flow API`**_](https://medium.com/@devrath.dev595/publisher-subscriber-using-shared-flow-api-e12baf32113e)
* [_**`Kotlin serilization for serilization of API and model objects`**_](https://github.com/devrath/KotlinSerialization)
* [_**`Okhttp interceptors to modify the netwrok requests`**_](https://github.com/devrath/fluffy-okhttp-interceptors)
* [_**`Scoped storage in android`**_](https://github.com/devrath/refactored-android-scoped-storage)
* [_**`Setting UI using view-groups`**_](https://github.com/devrath/DroidCustomUi)
* [_**`Storing data offline in application`**_](https://github.com/devrath/droid-offline-application)
* [_**`Elegant way to handle recycler view on-click`**_](https://medium.com/@devrath.dev595/an-elegant-way-to-handle-recycler-view-item-on-click-in-android-d011c95e2953)

### `π™³πšŽπš™πšŽπš—πšπšŽπš—πšŒπš’πšŽπšœ`🧡

* [Jetpack-Androidx](https://developer.android.com/jetpack/androidx): Major improvement to the original Android Support Library, which is no longer maintained.
* [View-Binding](https://developer.android.com/topic/libraries/view-binding): Allows you to more easily write code that interacts with views. An instance of a binding class contains direct references to all views that have an ID in the corresponding layout.
* [Lifecycle](https://developer.android.com/topic/libraries/architecture/lifecycle): Perform actions in response to a change in the lifecycle status of another component, such as activities and fragments.
* [LiveData](https://developer.android.com/topic/libraries/architecture/livedata): lifecycle-aware, meaning it respects the lifecycle of other app components, such as activities, fragments, or services.
* [Navigation](https://developer.android.com/guide/navigation/): helps you implement navigation, from simple button clicks to more complex patterns, such as app bars and the navigation drawer.
* [Timber](https://github.com/JakeWharton/timber): a logger with a small, extensible API which provides utility on top of Android's normal Log class.
* [DataStore](https://developer.android.com/topic/libraries/architecture/datastore?gclid=CjwKCAiAkrWdBhBkEiwAZ9cdcJQtRe-hDXI0aPKf4u8n0EfU-xh1ODfQ80ImOVEPKgRHaVmwGCrb-xoCJQwQAvD_BwE&gclsrc=aw.ds): iData storage solution that allows you to store key-value pairs.
* [Fused location provider](https://developers.google.com/location-context/fused-location-provider): Get location data for your app based on combined signals from the device sensors using a battery-efficient API.
* [Google play core](https://developer.android.com/guide/playcore): Download additional language resources, Manage delivery of feature modules, Manage delivery of asset packs, Trigger in-app updates, Request in-app reviews
* [Coroutines](https://developer.android.com/kotlin/coroutines?gclid=CjwKCAiAkrWdBhBkEiwAZ9cdcD5t8r7gogrF9MOUjglqJc0sx55z13IfZldSaHt8Wm1c2qLg7gwSlBoCKq8QAvD_BwE&gclsrc=aw.ds): A coroutine is a concurrency design pattern that you can use on Android to simplify code that executes asynchronously

### `π™²πš˜πšπšŽ πšœπšπš’πš•πšŽ`πŸͺ€

To maintain the style and quality of the code, are used the bellow static analysis tools.

| Tools | Config file | Check command | Fix command |
|---------------------------------------------------------|----------------------------------------------------------------------------------:|---------------------------|---------------------------|
| [detekt](https://github.com/arturbosch/detekt) | [/.detekt](https://github.com/VMadalin/kotlin-sample-app/tree/master/.detekt) | `./gradlew detekt` | - |
| [ktlint](https://github.com/pinterest/ktlint) | - | `./gradlew ktlint` | `./gradlew ktlintFormat` |
| [spotless](https://github.com/diffplug/spotless) | [/.spotless](https://github.com/VMadalin/kotlin-sample-app/tree/master/.spotless) | `./gradlew spotlessCheck` | `./gradlew spotlessApply` |
| [lint](https://developer.android.com/studio/write/lint) | [/.lint](https://github.com/VMadalin/kotlin-sample-app/tree/master/.lint) | `./gradlew lint` | - |

## **`πšƒπšŽπšŒπš‘ πšœπšπšŠπšŒπš”`** πŸ—οΈοΈ

| What | How |
|---------------- |------------------------------ |
| 🎭 πš„πšœπšŽπš› π™Έπš—πšπšŽπš›πšπšŠπšŒπšŽ (π™°πš—πšπš›πš˜πš’πš) | [π™ΉπšŽπšπš™πšŠπšŒπš” π™²πš˜πš–πš™πš˜πšœπšŽ](https://developer.android.com/jetpack/compose) , [π™°πšŒπšπš’πšŸπš’πšπš’+πš‡π™Όπ™»](https://developer.android.com/develop/ui/views/layout/declaring-layout) |
| πŸ— π™°πš›πšŒπš‘πš’πšπšŽπšŒπšπšžπš›πšŽ | [π™²πš•πšŽπšŠπš— π™°πš›πšŒπš‘πš’πšπšŽπšŒπšπšžπš›πšŽ](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html) |
| πŸ’‰ 𝙳𝙸 (π™°πš—πšπš›πš˜πš’πš) | [π™·πš’πš•πš](https://developer.android.com/training/dependency-injection/hilt-android) |
| 🌊 π™°πšœπš’πš—πšŒ | [π™²πš˜πš›πš˜πšžπšπš’πš—πšŽπšœ](https://kotlinlang.org/docs/coroutines-overview.html) + [Flow](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/) |
| 🌐 π™³πšŠπšπšŠπš‹πšŠπšœπšŽ | [πšπš˜πš˜πš–](https://developer.android.com/jetpack/androidx/releases/room?gclid=Cj0KCQiAtbqdBhDvARIsAGYnXBN8WeUfoN8Ln5XfcNlF83mZZbJjiboM1DU95jgGawDZ5pfegpNQWOMaAtt0EALw_wcB&gclsrc=aw.ds) |

## **`π™Ώπš•πšŠπš’πšœπšπš˜πš›πšŽ π™³πš˜πš πš—πš•πš˜πšŠπš`** 🧰

## **`πš‚πšžπš™πš™πš˜πš›πš`** β˜•
If you feel like support me a coffee for my efforts, I would greatly appreciate it.
Buy Me A Coffee

## **`π™²πš˜πš—πšπš›πš’πš‹πšžπšπšŽ`** πŸ™‹β€β™‚οΈ
Read [contribution guidelines](CONTRIBUTING.md) for more information regarding contribution.

## **`π™΅πšŽπšŽπšπš‹πšŠπšŒπš”`** ✍️
Feature requests are always welcome, [File an issue here](https://github.com/devrath/Distance-Tracker/issues/new).

## **`π™΅πš’πš—πš πšπš‘πš’πšœ πš™πš›πš˜πš“πšŽπšŒπš πšžπšœπšŽπšπšžπš•`** ? ❀️
Support it by clicking the ⭐ button on the upper right of this page. ✌️

## **`π™»πš’πšŒπšŽπš—πšœπšŽ`** ![Licence](https://img.shields.io/github/license/google/docsy) πŸš”
This project is licensed under the Apache License 2.0 - see the [LICENSE](https://github.com/devrath/Distance-Tracker/blob/main/LICENSE) file for details