/Coroutines-Workshop

Simple sample app to run a workshop about RxJava & Coroutines

Primary LanguageKotlinApache License 2.0Apache-2.0

Rick&Morty Coroutines Workshop logo

feed detail1 detail2

What to do?

It's simple. First, checkout the branch called rxjava. Then replace all the RxJava code you find by using Coroutines :) You can find useful information here and if you find yourself stuck, one of the possible solutions is in the branch coroutines.

The current app is using Model/View/Presenter + Clean Architecture and Koin 2.0 for DI (or just a service locator, ask Jake Warthon). The app is also using Room to persist data and contains the classical Cache/Db or Cloud check in the Repository pattern.

Useful dependencies you'll need:

  • implementation "androidx.room:room-ktx:$roomVersion" (Adds support for suspending functions to Room)
  • implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0-M2' (Adds useful objects you will need. Specially if using ViewModels)

Other considerations

  • You will need to write tests. I didn't to force you to do it and not just check them and forget about it. So, take it into account when refactoring ;)
  • The app may be a bit... unstable?... Rick&Morty aren't very good devs. You may find things when refactoring. Fix them!

API

  • API used: Rick&Morty API (you can check the api documentation here).
  • Endpoints used: "/api/character/", "/api/character/{id}"

Third-Party Libraries

feed
Let's play!