Skip to content Skip to sidebar Skip to footer

Power Button Creating Issue In Andengine Game

I developed a game in andEngine which is almost final. Only problem I am facing now is that when during GamePlay if power button is pressed and Game is resumed again It starts from

Solution 1:

You have to save current state in onSaveInstanceState() and load it in onRestoreInstanceState().

Check this link: Android activities

Specifically:

Solution 2:

The main activity detects when it is being paused and taken out of memory. Look into the Activity onPause() and onResume().

Post a Comment for "Power Button Creating Issue In Andengine Game"