Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Coroutine x Retrofit - Android Developer Day

Coroutine x Retrofit - Android Developer Day

Explain alternative solution to handler asynchronous processing made easily on Android with Coroutine and Simple Implementation about (Flow & Channel).

Raka Adi Nugroho

September 14, 2019
Tweet

More Decks by Raka Adi Nugroho

Other Decks in Programming

Transcript

  1. Say Hello to Coroutine What is that Why Coroutine? What

    can Coroutine Do? Agenda Coroutine met Retrofit
  2. Asynchrony refers to the occurrence of events independent of the

    main program flow and ways to deal with such events - wikipedia
  3. Coroutine? A coroutine is a concurrency design pattern that you

    can use on Android to simplify code that executes asynchronously.
  4. launch fire forget return as Job async fire giving result

    return as Deffered runBlocking Blocks current Thread Coroutine Builder
  5. Solve 2 Primary Problem Manage long-running tasks that might otherwise

    block the main thread and cause your app to freeze. Providing main-safety, or safely calling network or disk operations from the main thread.
  6. Solve 2 Primary Problem Manage long-running tasks that might otherwise

    block the main thread and cause your app to freeze. Providing main-safety, or safely calling network or disk operations from the main thread.
  7. Wrap Up > Coroutines make asynchronous easily > Support to

    Several Android JetPack > Kotlin! yeah > Coroutine could be Alternative Solution