Is there a way to use something like AsyncTask's 'onProgressUpdate' using Kotlin's Anko library?

63 views Asked by At

I have heard that AsyncTask will be deprecated in Android 11 in favour of Kotlin's Anko library's 'doAsync{}', 'uiThread{}', etc. blocks. I want to use this and update a progress bar after each loop in a for loop. Is there a way without using AsyncTask? Or am I way off? Please let me know because I am quite a beginner when it comes to any sort of programming in the first place.

1

There are 1 answers

0
Avinash On
 Please read this article :>

https://developer.android.com/kotlin/coroutines

it may helps you.