Skip to content

cj3dreams/FetchChicago

Repository files navigation

FetchChicago

©2023 Fetch. This is Fetch icon, a little bit redesigned by me, it's not meaning that you can use that!

©2023 Fetch. This is Fetch icon, a little bit redesigned by me, it's not meaning that you can use that!

This is a Take Home Test from Fetch Rewards

Used languages: Kotlin, Android XML, Groovy(build.gradle), SQL(one request).

My stack: MVVM + Clean Architecture + Usecases, Single Activity

Used dependencies: Koin, Coroutines, Retrofit, Room, Jetpack Navigation, Logging Interceptor (for tests).

The target of testing task were:

  1. To get an array from the REST Api;
  2. Order that first of all by "listId" and only then by "name";
  3. Filter out any item, which includes null or blank data in column "name";
  4. Show as understandable list.

Extra things, which I added

  1. Additional sorting via SQLite + saving to see data offline.
  2. Coroutines: Competently(for my level) wrote code using Kotlin Coroutines, especially of REST & SQL Requests.
  3. SwipeToUpdate: As you know, it caching data in database, for updating remote list or database cache you can just swipe to update.
  4. Main thing: I wrote code as good as I could, if even it wasn't indeed to write/make a lot things for this small testing task. Some little things: Theme, splashScreen, icon, cardView, bottomNavView, navigation, etc.

App Icon Empty Database/No Network Connection SwipeToUpdate After swipe to update

Shortly how it works

Sorted/Rest Display:

Application is getting an array from https://fetch-hiring.s3.amazonaws.com/hiring.json using Retrofit+GsonConvertor via usecase from data repository to the viewModel, sorting that in viewModel and providing to UI(in this case RecyclerView), mostly vice versa, because UI is observed to MutableLiveData in viewModel. Easily realized with Koin :)

Sorted/Local Display:

Almost same like above, however first of all it's inserting remote list to the local base and then getting list from database with SQL request using "where", "order by" etc.

Unsorted Display:

Just getting list from remote source and showing without any sorting/filtering to see difference between two previouses.

More screenshots:

Splash Screen Sorted/Rest Display Fetch icon on Desktop Opened first time local display without network connection

About

This is a Take Home Test from Fetch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages