javamail - "android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application" -
i want show alertdialog when send mail. have exception. windowmanager$badtokenexception
mean?
pdialog = progressdialog.show(mainactivity.scontext , "", "sending mail...", true); retreivefeedtask task = new retreivefeedtask();
as far can understand question problem trying update ui on different thread, , isn't possible. retreivefeedtask
executing on different thread.
you have run code dispay alertdialog on ui thread. can pasting following code in own code , add code in body of method run()
.
activity.runonuithread(new runnable() { public void run() { } }
Comments
Post a Comment