>'android.view.WindowManager$BadTokenException: Unable to add window -- >token android.os.binderpr...@435904d8 is not valid; is your activity >running'
Make sure you showDialog(...) on the UI thread. Maurizio On Aug 21, 5:00 am, Sundar <vmsund...@gmail.com> wrote: > Hi, > > I have an application that downloads some content from the network, > processes it and displays it. > When any link is clicked, the user task(async task) is used to > download and process the content and the content is shown in the new > activity. > > I want to show a progress dialog until the content gets downloaded and > processed. But when i call the progessdialog.show() method I am > getting the following error. > > 'android.view.WindowManager$BadTokenException: Unable to add window -- > token android.os.binderpr...@435904d8 is not valid; is your activity > running' > > I use the get method to get the result from the user task. I make the > main thread to wait until the usertask > completes its work. I know this is a bad way, but the normal handler > does not work here.I think it is not good idea to start a new activity > in the onPostExecute method. > > Please tell me how to do this. > > Thanks in advance. > > V. Sundar --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---