Weird Home button behavior

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

Weird Home button behavior

Postby Your_Rain » Sat Jan 23, 2010 4:06 am

Hi all.
I'm experiencing kind of strange behavior of my application after hard Home button is pressed.
When you press Home, everything is OK - my app goes to the background, showing Home screen. But if you try to choose my app in the main menu or in the list of last tasks it behaves like it was not started before and does not show the last activity you were on - it just starts from scratch, namely, shows the splash screen and starts next corresponding activities. Moreover, old activities of this app remain on the activities stack, and previous instance of the app is not terminated - so if you press Back for a few times you'll just run into those activities which were undoubtedly started during the previous session of work with my app. Splash screen activity is filtered by "android.intent.action.MAIN" filter and "android.intent.category.LAUNCHER" category.
The strange thing is that all of that happens despite the fact that I do not intercept any Back key hits, or override any onPause or onResume methods. What's happening contradicts with my understanding of Android app lifecycle - I was sure that when you hit Home an app just goes to the background, and when you choose it in the menu later - it just unwinds and does not start anew. (Of course, unless stuff like that is stated in the app manifest or corresponding methods are overridden or something else).
I hope you will be able to help me. Any advice on what to pay attention to or where to search for solution would be really great.

Regards, Alex
Once Poster
Once Poster
Posts: 1
Joined: Sat Jan 23, 2010 3:35 am


Postby Johan Degraeve » Sat Jan 23, 2010 9:48 pm

well I experience your behaviour when I download my app from the market, not when I install it via USB using adb install.

I also made a post about my problem application_behaves_differently_when_downloaded_from_market-t10086.html

curious to see other answers

Johan Degraeve
Experienced Developer
Experienced Developer
Posts: 55
Joined: Tue Oct 27, 2009 1:50 pm
Location: Belgium


Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 10 guests