Skip to main content

Posts

Showing posts from December, 2012

Android Background processing with AsyncTask

I had to download data from server and bind it with the ListView .I studied about this and finally used AsyncTask for background processing.I'm going to post some code and it's description about Android background processing. AsyncTask AsyncTask is designed to perform background processing and publish result on the UI thread.It is a helper class around Thread and Handler and does not constitute a generic threading framework.AsyncTask is defined by three generic types called Params , Progress and Result .And it has four callback methods called onPreExecute() , onPostExecute() , doInBackground() and onProgressUpdate() . public Load extends AsyncTask<Params,Progress,Result> { } AsyncTask's generic types Params :-It's a parameters send to the task upon execution. Progress :-This parameter shows progress units during background processing. Result :-It return type of result of the background processing. If you don't require it&