Slide 1

Slide 1 text

About speaker Hello! I’m Toan Vice President, Mobile @Lazada (Looking for Android folks to join me!) https://medium.com/@toantran toan_mobi toantran-ea

Slide 2

Slide 2 text

Kotlin Asynchronous Flow, A beginner guide for RxJava people

Slide 3

Slide 3 text

Agenda 1. Why I mention RxJava here? (Target audiences) 2. Revisit coroutine concepts. 3. Idea 4. Key takeaways

Slide 4

Slide 4 text

Why I mention RxJava here? - The perfect duos. Loader pattern? IntentService? Create threads? Java Future?

Slide 5

Slide 5 text

Why I mention RxJava here? 2. The sweet abusive usage.

Slide 6

Slide 6 text

Why I mention RxJava here? 3. The demand for it!

Slide 7

Slide 7 text

Revisit coroutine concepts Suspending functions CoroutineBuilders (async, launch, runBlocking) CoroutineScopes (Activity, Application, viewModel, etc) CoroutineDispatchers (Main, IO, Defaut, Unconfined) Coroutine

Slide 8

Slide 8 text

Revisit coroutine concepts (cont) Photo courtesy from raywenderlich Timeline MainThread function1() function2() function3() Blocking model

Slide 9

Slide 9 text

Idea RxJava2 and Kotlin Flow are “Cold stream”

Slide 10

Slide 10 text

Idea (cont)

Slide 11

Slide 11 text

Key takeaways

Slide 12

Slide 12 text

Thank you