Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gs-ts/TrackMyPath
An Android app written in Kotlin that demonstrates a clean architecture with MVVM, Fused Location Provider, LifecycleService, and Coroutines. It is used as lab to test new Android features.
https://github.com/gs-ts/TrackMyPath
android android-location clean-architecture coroutines flickr flickr-api foreground-service fusedlocationproviderclient hilt hilt-android koin kotlin kotlin-coroutines lifecycle-service livedata-viewmodel moshi mvvm retrofit2 room viewbinding
Last synced: 3 months ago
JSON representation
An Android app written in Kotlin that demonstrates a clean architecture with MVVM, Fused Location Provider, LifecycleService, and Coroutines. It is used as lab to test new Android features.
- Host: GitHub
- URL: https://github.com/gs-ts/TrackMyPath
- Owner: gs-ts
- Created: 2019-07-10T21:18:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-14T20:47:08.000Z (almost 4 years ago)
- Last Synced: 2024-07-15T22:01:46.085Z (4 months ago)
- Topics: android, android-location, clean-architecture, coroutines, flickr, flickr-api, foreground-service, fusedlocationproviderclient, hilt, hilt-android, koin, kotlin, kotlin-coroutines, lifecycle-service, livedata-viewmodel, moshi, mvvm, retrofit2, room, viewbinding
- Language: Kotlin
- Homepage:
- Size: 3.71 MB
- Stars: 71
- Watchers: 3
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-android-kotlin-apps - TrackMyPath - ts](https://github.com/gs-ts) | An Android app written in Kotlin that demonstrates a clean architecture with MVVM, Fused Location Provider, LifecycleService, and Coroutines. It is used as lab to test new Android features.</br></br> <b>Tech Stack</b> : Koin, Coroutines, Testing, Retrofit, Room, LiveData, ViewModel </br></br> <i> Last commit: 3 years ago</i> | π 71 </br> π΄ 13 </br> ποΈ 3 | (:art: Pattern / MVVM)
README
# Track my path
An android app that tracks your walk with images every 100 meters:
- images fetched from Flickr based on location
- pictures are shown in a list, and user can scroll through the stream
- one button start/stop, on each start the previous stream of photos gets wiped
- when the app is removed from background and user has not stopped the tracking, the tracking continues in a service*Please create a Flickr account and use your own api key. Add it in the FlickrApi file.*
---
### MVVM pattern with Clean architecture developed with Kotlin.
Clean architecture consists of three layers:
- **Data**, includes data objects, databases, network clients, repositories.
- **Domain**, includes use cases of business logic. This layer orchestrates the flow of data from Data Layer to Presentation and the other way.
- **Presentation**, includes UI related components, such as ViewModels, Fragments, Activities.##### Android Jetpack Components used:
- Fragment
- ViewModel
- [LifecycleService](https://developer.android.com/reference/androidx/lifecycle/LifecycleService)
- View Binding
- LiveData
- Room
- [Location](https://github.com/googlesamples/android-play-location/tree/master/LocationUpdatesForegroundService)
- [ActivityScenario](https://developer.android.com/guide/components/activities/testing), instrumentation testing (part of AndroidX Test)
- Espresso (UI tests)##### Libraries:
- [Koin](https://insert-koin.io/), (in master branch) an easy-to-use DI framework. [Nice comparison with Dagger](https://medium.com/@farshidabazari/android-koin-with-mvvm-and-retrofit-e040e4e15f9d)
- [Hilt](https://developer.android.com/training/dependency-injection/hilt-android) (in [feature-hilt-di branch](https://github.com/gs-ts/TrackMyPath/tree/feature-hilt-di)) a DI library for Android based on Dagger
- [Kotlin Coroutines](https://developer.android.com/kotlin/coroutines)
- [fresco](https://github.com/facebook/fresco), an Android library for managing images and the memory they use
- [Retrofit](https://square.github.io/retrofit/)
- [OkHttp](https://square.github.io/okhttp/)
- [moshi](https://github.com/square/moshi), JSON library for Kotlin and Java
- [Timber](https://github.com/JakeWharton/timber), a logger which provides utility on top of Androidβs Log class
- [detekt](https://github.com/detekt/detekt), Static code analysis for Kotlin##### Flickr API:
- [flickr.photos.search](https://www.flickr.com/services/api/flickr.photos.search.html)Sources:
- [Google I/O 2018 app β Architecture and Testing](https://medium.com/androiddevelopers/google-i-o-2018-app-architecture-and-testing-f546e37fc7eb)
- [Clean Architecture of Android Apps with Practical Examples](https://rubygarage.org/blog/clean-android-architecture)
- [Clean Architecture Guide (with tested examples): Data Flow != Dependency Rule](https://proandroiddev.com/clean-architecture-data-flow-dependency-rule-615ffdd79e29)----
### Screenshots