AsyncTask enables proper and easy use of the UI thread. This class allows you to perform background operations and publish results on the UI thread without having to manipulate threads and/or handlers. AsyncTask is designed to be a helper class around Thread and Handler and does not constitute a generic threading framework. AsyncTask should ideally be used for short operations.An asynchronous task is defined by a computation that runs on a background thread and whose result is published on the UI thread. An asynchronous task is defined by 3 generic types:-
*Params
*Progress
*Result
An asynchronous task is defined by 4 steps:-
* onPreExecute
*doInBackground
*onProgressUpdate
*onPostExecute
Comments
Post a Comment