I'm have a game that's uses SurfaceView implementation to display the objects.
I have a thread which draws the SurfaceView time-to-time to the screen.
The game is running completely.
Unfortunately, it needed to have a pause function whenever the game is interrupted.
Well, I know that I need to manipulate onResume
and onPause
.
But I can't get it right. The error points me back to surfaceCreated
where I start the thread telling me that the thread has started already. I tried using the resume
and suspend
on the onResume
and onPause
respectively but nothing changed.
How can I achieve this? I have already done how the objects location would be save using File-I/O handling.
Thanks in advance.