The article New Android R Important Changes said AsyncTask deprecated
Starting from this version of the Android async task will be deprecated. Async task is used to do short running operations on the background thread, and publish results on UI Thread. Android advice to use the
java.util.concurrent
or KotlinCoroutines
. Here is the example code below.
It’s shocking so I look back to Android Developer AsyncTask, and find the official comment:
This class was deprecated in API level 30.
Use the standardjava.util.concurrent
or Kotlin concurrency utilities instead.
…. I don’t know what to say … what I can do is reading the article written by by Vasiliy (which I strongly suggest reading,)