Tuesday 22 January 2013

Android.view.windowmanager$badtokenexception unable to add window token null

Hi i am facing this Error when creating Dialog in Android

ERROR IS - android.view.windowmanager$badtokenexception unable to add window token null 

I resolved this issue using below one in my scenario.This may be help full for you

In my case i am trying to create my dialog like below code:

new Dialog(getApplicationContext());

This can be changed as

new Dialog(this);

Now Dialog will be appear without any Error.

If it is useful then please add your valuable comments Below.

No comments:

Post a Comment

Android SQLite Database Viewer or Debuging with Stetho

Every Android Developer uses SQLite Database to store data into the Android Application data. But to view the data in SQLite have a lot of...