publish date
Jun 26, 2022
duration
37
min
Difficulty
Case details
What's the idea: Async and Threading are words that very often scare the developers. Traditionally we have managed some of those tasks with the now deprecated AsyncTask, but that callback oriented way has some limitations. Let's learn how we can refactor our legacy background operations using callbacks for a graceful and very optimized way using Kotlin Coroutines. You will get started with Kotlin coroutines, learn how to perform multiple operations in parallel or performing sequential operations all in a performant manner. –Why this is important? A common pitfall in Android apps are the issues when performing asynchronous operations. The user experience is impacted by either affecting the performance or not showing the proper feedback to the user. This talk will go from 0 to advanced on the needed concepts to achieve a clean implementation of async work using Kotlin Coroutines. – My experience: I have been using Kotlin Coroutines for the past 3 years. I can count many cases where it has helped: * I have cut the executing times in half just by using coroutines properly. * I have solved tricky lifecycle issues like a timer callback being called after the fragment is destroyed despite being cancelled onDestroy. All with coroutines and its cancellation protocol. * I created a performant socket connection implementation using Kotlin Flow" What are coroutines, why coroutines are the best option for async work, how coroutines interact with the lifecycle, how can we clean up my code using coroutines, how can we perform task in parallel efficiently [color=#111111][size=2][font=Verdana, Arial, Helvetica, sans-serif][h2][b][url=https://drive.google.com/file/d/1CHIcjzt3J2ttWOQXEoq0cRbNcltcSvKj/view?usp=sharing]Slides[/url][/b][/h2][/font][/size][/color]
Share case: