Android AsyncTask API deprecating in Android 11.What are the alternatives?
Mayank
Posted on September 2, 2020
One of the simplest alternative is to use Thread
new Thread(new Runnable({
public void run(){
// do your stuff
runOnUIThread(new Runnable({
public void run(){
// do onPostExecute stuff
}
})
})).start();
If your project supports JAVA 8, you can use lambda
new Thread(() -> {
// do background stuff here
…
💖 💪 🙅 🚩
Mayank
Posted on September 2, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
watercooler Why does a reboot make your PC run SO much faster than running all the cleaning tools you can possibly imagine?
November 30, 2024