Are you starting your Thread with thread.start() in a surfaceCreated ? If so, there will always be an error if you do not use a member variable that contains a check to see if your game was running.
You need to “pause” your Thread in the surfaceDestroyed using the wait() command so that it does not repeat your game code during a pause. The next time you launch your application (for the first time or, possibly, the second time), you need to start() it or notify() it (after a pause) depending on the circumstances.
Finally, always always send the code. This will allow people to correctly and correctly answer the question.
Wroclai Mar 10 '11 at 7:20 2011-03-10 07:20
source share