Demo video can be checked from here: https://youtu.be/6cp580Eb908
Before running the app, make sure to add following values to the local.properties
file:
api.client=CLIENT
api.secret=SECRET
# version can be changed if needed
api.version=20180323
-
Dagger Hilt
for Dependency Injection and easy to use -
MvpPresenter
: I usedViewModel
as a base ofMvpPresenter
as it's provided by the platform and because of theDagger Hilt
support. I implementedMvpPresenter
by extendingViewModel
. I tried not to over-engineer the solution, that's why I think solution is maintainable with current requirements and architecture. I wrote unit tests for the complex part ofSearchPresenter
. Presenter directly uses injectedLocationRepository
andSearchVenuesUseCase
. I wrote some unit tests forSearchVenuesUseCase
since it has page related calculation. -
RxJava 2
: To use publish-subscribe pattern and make threading easy, I usedRxJava 2
. Mainly usedObservable
andSingle
. Besides those, I usedRxBinding
andRxRelay2
. -
Retrofit
andMoshi
: used for fetching data from API and deserializing JSON. At work I use GSON as well but I have read often thatMoshi
is faster thanGSON
, that's why, I used it. I also wrote test forFoursquareRequestInterceptorTest
which adds client id, secret and API version to all requests by default. -
Utilized
DiffUtil
to prevent unnecessary updates inRecyclerView
-
Paging 3
: it was first time I used newPaging 3
library. I have used previouslyPaging 2
but compared to that one, it was simpler to implement pagination usingPaging 3
. -
Github Actions
: used this for creating basic CI with validate, build and test workflows.
-
Unfortunately, I didn't have time to polish UI. UI definitely needs some polishing, extracting styles to make it more reusable. Also, it'd be nice to implement more explaining screen for the location permission.
-
Implement offline-first approach
-
Dark theme implementation
-
UI tests for activity to make sure correct states are displayed
-
Change logo :D
-
...