Challenge
- Display restaurants around the user’s current location on a map ○ Use the FourSquare Search API to query for restaurants: https://developer.foursquare.com/docs/api/venues/search
- Load more restaurants when the user pans the map. 2.1 Cache results in-memory (no need to persist the cache). 2.2 Read restaurants from the cache to show results early, but only if the restaurants fit within the user’s current viewport.
- Include a simple restaurant detail page.
before run
- Get Client ID and Secret fro FourSquare and update AppConst file 2- Get your Google Map key and Update google_maps.xml file
How to run the project
- Download the project
- Import the project to Android Studio Tool
- Run the project
- Check the Emulator or your real device
How to run the unit and instrumentation tests
-
Make sure your emulator is up running (for instrumentation test only)
-
OPen the terminal from Android Studio 3- type the following command in terminal
./gradlew test connectedAndroidTest
Run Ktlint
-
to check the formatting. Run the following command in terminal ./gradlew ktlintCheck
-
to format the code. Run the following command in terminal ./gradlew ktlintFormat
Run Lint
- open terminal and run ./gradlew lint
- check issues like accessibility and find lint-results file under build/reports
The App Architecture
- Clean Architecture based on the MVVM Architecture pattern with Interactors
Libs
- Hilt for dependency Injection
- RxJava for Handling Threading , powerful operators and Reactive Programming
- Architecture Components like ViewModel and LiveData
- Junit for Assertions
- Mockito for mocking objects