[android-beginners] Re: Getting android.view.WindowManager$BadTokenException alternatively

2009-12-22 Thread Ronin
(); // this give you the bad token error. change it to:            *Context context = this;* // this assignment will remove your bad token exception. On Tue, Dec 15, 2009 at 8:27 AM, Ronin akpra...@gmail.com wrote: Hi, I am trying to write a small game application in Android. Following error

[android-beginners] Re: Getting android.view.WindowManager$BadTokenException alternatively

2009-12-22 Thread Ronin
context = getApplicationContext(); // this give you the bad token error. change it to:            *Context context = this;* // this assignment will remove your bad token exception. On Tue, Dec 15, 2009 at 8:27 AM, Ronin akpra...@gmail.com wrote: Hi, I am trying to write a small game

[android-beginners] Getting android.view.WindowManager$BadTokenException alternatively

2009-12-15 Thread Ronin
Hi, I am trying to write a small game application in Android. Following error is seen when I try to do showDialog(). When I launch the emulator and start the game the first time it works fine. Then, the second time, it fails with the error. And 3rd, 5th, 7th time it works fine. Whereas it fails

[android-beginners] Getting android.view.WindowManager$BadTokenException alternatively

2009-12-15 Thread Ronin
Hi, I am trying to write a small game application in Android. Following error is seen when I try to do showDialog(). When I launch the emulator and start the game the first time it works fine. Then, the second time, it fails with the error. And 3rd, 5th, 7th time it works fine. Whereas it fails