Restart a Game Application in android

Put your problem here if it does not fit any of the other categories.

Restart a Game Application in android

Postby suhasmannar » Mon Nov 15, 2010 4:52 am

Hi,

I am creating a small game application in android. After completing the game i need to restart the game. I have given an intent to restart the game. Is there any better way to restart the game application.
suhasmannar
Developer
Developer
 
Posts: 28
Joined: Thu May 06, 2010 6:27 am
Location: Karnataka, India

Top

Re: Restart a Game Application in android

Postby urbantrad » Mon Nov 15, 2010 1:40 pm

You could reset all the data, which would cause the game to be back in it's initial state, aka restarted.
You can do this by extracting all the initialisations you do in the onCreate, onStart,... into another method, which you call both at the beginning (start) and at the end (restart) of the game.
urbantrad
Senior Developer
Senior Developer
 
Posts: 104
Joined: Thu Sep 09, 2010 10:19 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot], Google Feedfetcher and 15 guests