I need to show the Alertdialog
inside Asynctask
in android , but it won`t show in throws exception.
05-13 14:59:35.522: WARN/System.err(1179): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
Thanks.
It isn't possible to manipulate the UI from the background thread. Use handler or the onPre/Post methods of the AsyncTask for that.
Show the dialog in onPostExecute() method rather than doInBackground.
Hope that helps
I think this might be your problem -- you can't show a dialog from inside doInBackground.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With