https://github.com/smarttoolfactory/foursquare-retrofit-mvvm-dagger-example
Fourquare api with Retrofit + Dagger + MVVM and data binding
https://github.com/smarttoolfactory/foursquare-retrofit-mvvm-dagger-example
Last synced: 4 months ago
JSON representation
Fourquare api with Retrofit + Dagger + MVVM and data binding
- Host: GitHub
- URL: https://github.com/smarttoolfactory/foursquare-retrofit-mvvm-dagger-example
- Owner: SmartToolFactory
- Created: 2018-12-21T06:44:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-27T04:40:18.000Z (over 6 years ago)
- Last Synced: 2025-01-08T14:11:57.927Z (5 months ago)
- Language: Java
- Homepage:
- Size: 4.12 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Foursquare+Retrofit+MVVM+Dagger Example
This project uses Retrofit2 to retrieve data from Foursquare api. ViewModel and data binding is used to display data. ViewModels are created via ViewModelFactory which is injected via Dagger2.
You need to change FOURSQUARE_CLIENT_ID, FOURSQUARE_SECRET_ID in FourSquare service class to get results from Foursquare api. To be able to display maps you need to use a valid Google api key.
Single Activity version has 2 fragments and pass data between fragments and MainActivity via ViewModels.
Multiple activity version has 2 activites and 2 fragments. List of venues is passed to second activity via bundle. And dependency injection of this example is slightly different than single activity one.Note: There is a problem with UserCommentAdapter binding. It does not display user comments eventhough user comments inside ViewHolder are not null