I have a game which has surfaceview and running on a thread. if I press HOME button when the game\'s playing and then I open the game again through the icon, I get a force c
Do you start your Thread
by using thread.start()
in the surfaceCreated
callback? If so, there will always be an error if you're not using a member variable that contains a check if your game has been started.
You need to "pause" your Thread
in the surfaceDestroyed
callback using wait()
command so it doesn't reiterate your game code during pause. Next time you're starting your application (for the first time or maybe second time) you need to start()
it or notify()
it (after pausing) depending on the circumstances.
At last, always always post code. That will engage people to answer the question properly and correct.