Sunday, June 6, 2010

[android-developers] The Lunar Lander bug

This bug seems to be quite famous, if you do a Google search on it.
However, I still can't find the solution to it. After all this time,
and after several android version releases, the bug still exists and
no one has bothered to update it.

Here's one website which offers a solution (and I've seen the same
solution offered elsewhere...):

http://android-er.blogspot.com/2010/06/illegalthreadstateexception-in.html

The solution is said to be to "move the code:
thread = new MySurfaceThread(getHolder(), this);
...from constructor of the SurfaceView to inside the surfaceCreated()
method.

Well I've tried it, and it just causes me further bugs, and before I
know it I've got the code into a right mess trying to figure it out.

If anyone can shed any light on this, and offer the code which sorts
this example out once and for all, I for one would be very
grateful :-)

ps. The bug is where you press the 'home' key during play, and then
return to the game, because you can't call thread().start twice.

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment