Home > OS >  Does Kotlin Coroutines replace AsyncTask?
Does Kotlin Coroutines replace AsyncTask?

Time:09-16

Is AsyncTask still needed?

In Android with Java, we used to implement an AsyncTask and AsyncTaskLoader, but recently I've been beginning to learn Kotlin and I've noticed that things like that are done by Kotlin Coroutines.

CodePudding user response:

AsyncTask it's officially deprecated since Android11

https://developer.android.com/reference/android/os/AsyncTask

Coroutines are the recommended choice, and considering Kotlin is the official language since 2017, then using AsyncTask is no longer a standard option.

  • Related