No there is no way to know. Also onStop() can happen in other cases (for instance if the user switches to another app, not necessarily by going back Home.)
On Sun, Aug 2, 2009 at 4:21 PM, Wah<[email protected]> wrote: > > Hi: > > Thanks for the suggestion. It turned out even when sliding out the > keyboard, the onStop() function is also called. Is there a way to tell > the difference between onStop() from sliding keyboard versus the home > button? > > Wah > > On Jul 31, 12:02 am, Saurav Mukherjee <[email protected]> > wrote: >> u can try it this way... >> wen home is pressed, onPause and then onStop are called. >> >> wen resumed on long press of home button, the following functions gets >> called in order: >> >> onRestart >> onStart >> onResume >> onPostResume >> >> try n override these functions to do ur work... >> >> hope this helps... >> >> cheers! >> >> On Fri, Jul 31, 2009 at 9:09 AM, Jack Ha <[email protected]> wrote: >> >> > You won't be able to detect that as KeyEvent.KEYCODE_HOME can't be >> > intercepted. It is for internal use only. >> >> > -- >> > Jack Ha >> > Open Source Development Center >> > ・T・ ・ ・Mobile・ stick together >> >> > The views, opinions and statements in this email are those of >> > the author solely in their individual capacity, and do not >> > necessarily represent those of T-Mobile USA, Inc. >> >> > On Jul 30, 8:09 pm, Wah <[email protected]> wrote: >> > > In an activity, how do detect the fact that the user pressed the home >> > > button? > > > -- Romain Guy Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

