What are Handler used in android proggraming for? How do we use them to dismiss the ProgressDialog?
I have referred few things from the Net regerding this but couldn’t found them pretty convincing. An example of dismissing a ProgressDialog along with Handler will be a great thing.
Thanks,
david
Use AsyncTask instead. It has a function called onPostExecute where in you can dismiss the Progress Dialog.
Handlers are used to run a small section of code at a predetermined time. Typically one uses AlarmManager to launch intents (activities, services, broadcasts), but if you are interested in running only a small section of code you can use handlers:
I’d strongly recommend using a AsyncTask for anything thread related on Android.