AsyncTask Android

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
Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on whatsapp
WhatsApp

Android Example

OUTPUT

06-14 11:07:23.295 17987-18035/? D/AsyncTaskExample: On doInBackground…
06-14 11:08:25.039 18441-18469/chandanai.com.asynctask D/AsyncTaskExample: On doInBackground…
06-14 11:08:25.263 18441-18441/chandanai.com.asynctask 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

AsyncTask

Be the first to comment

Leave a Reply

Your email address will not be published.


*