AsyncTask is a utility library that ports the Android SDK's AsyncTask class for use in plain Java applications. It enables the easier use of threads in Java applications by allowing you to perform ...
In the below example I have clearly described how to use AsyncTask. First of all you should know what is AsyncTask ? AsyncTask is an abstract class provided by android which helps us to use the UI ...
Instantiate the above reference in onCreate() method of activity. Ex:- mProgressDialog = new ProgressDialog(this); // here this is the object of your activity mProgressDialog.setMessage("Please wait") ...