Sunday, August 22, 2010

AsyncTask background Process / Thread in android

private class AsyncCheckInternet extends AsyncTask {
@Override
protected void onPreExecute() {
dialogProcess = ProgressDialog.show(classname.this, "",
"processing...", true);
}
@Override
protected Boolean doInBackground(Void... voids) {

// Background function logic
}
@Override
protected void onPostExecute(Boolean params) {
dialogProcess.dismiss();
// After background Process end Called params true or false....
}
}
}


// call background AsyncTask

new AsyncCheckInternet().execute();

No comments:

Post a Comment