Android lifecycle of thread-based game
- by ehehhh
I ran into a bit of trouble while trying to get my game to work correctly after being put to the background by the user or a phone call for example.
My app has a SurfaceView class called GameView, which has the onDraw() method to do all the necessary drawing for my game and two threads - one for calling the onDraw() and one for doing the necessary…