Activity restarts After Pressing the Home Key

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Activity restarts After Pressing the Home Key

Postby Karthikayan » Wed Jun 10, 2009 2:10 pm

Hi Everyone,
I'm porting a j2me game to android. I have a problem that the Activity restarts After Pressing the Home Key when the application is active. The control goes to onPause when i do press the home key. When I open the game the game restarts the game. Is there Im missing.

Posts: 6
Joined: Thu Oct 23, 2008 4:57 pm


Postby Abu » Thu Jun 11, 2009 2:59 am

kindly check if there is any broadcast reciever associated for the HOME key in your application .

if so ,

check the intent declaration and use

<Intent object>.setFlags(FLAG_ACTIVITY_SINGLE_TOP);

this will make sure there is no more new activity created if there exists any , already.
Once Poster
Once Poster
Posts: 1
Joined: Tue Dec 16, 2008 3:42 am
Location: India


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Exabot [Bot] and 2 guests