0

I'm playing my game. While playing, I press the home button on my Android phone. Then I press the game Icon on my Android screen, and the game starts from beginning. I know there is OnApplicationPause. But what should I add there? How can I continue my game from the position where I left the game?

Bart
  • 19,692
  • 7
  • 68
  • 77
Johnny
  • 612
  • 3
  • 13
  • 32
  • There is a TON of information on this and it really depends on how you code your game as to how you retain state through pause. – zgc7009 May 26 '14 at 15:13

1 Answers1

1

really depends on your situation but basically save your gameState in onPause and load it in onResume Please read: http://developer.android.com/training/basics/activity-lifecycle/pausing.html

ligi
  • 39,001
  • 44
  • 144
  • 244