AsyncTask Android

Spread the love

AsyncTask Android

Asynctask(Asynchronous task) in android enable us to perform the task in Background thread giving us the way to separate our tedious work from UI Thread and publish our work back to UI thread after our work get completed.

It has following method

  1. onPreExceute
  2. doInBackGround
  3. publishProgress
  4. onProgressUpdate
  5. onPostExceute

Android Example



06-14 11:07:23.295 17987-18035/? D/AsyncTaskExample: On doInBackground…
06-14 11:08:25.039 18441-18469/ D/AsyncTaskExample: On doInBackground…
06-14 11:08:25.263 18441-18441/ D/AsyncTaskExample: You are in progress update … 0
You are in progress update … 1
You are in progress update … 2
You are in progress update … 3
You are in progress update … 4

multithreading and concurrency in android 48 638
Android AsyncTask example with progress bar in kotlin android studio

Be the first to comment

Leave a Reply

Your email address will not be published.