Thanks. But in that case, I would need to remember the top most activity of the entire android stack (of other applications). I basically need to send my application and all its related activities to background.
I have used 'moveTaskToBack' which moves it to background. But I am not sure if this is the right or the preferred way. thanks. On Thu, Dec 11, 2008 at 10:05 PM, Andrew Stadler <[EMAIL PROTECTED]> wrote: > > The way to "send my activity" to the background is to send another > activity to the foreground... All you have to do is create an Intent > and call startActivity(). > > > On Thu, Dec 11, 2008 at 3:17 AM, sthustfo <[EMAIL PROTECTED]> wrote: > > Hi, > > > > How do I send my activity to background when user presses a key? What > should > > I do in the onKeyDown() event handler? Using finish() will destroy the > > activity. > > > > public boolean onKeyDown(int keyCode, KeyEvent event) > > { > > super.onKeyDown(keyCode, event); > > > > // finish(); > > return true; > > } > > > > Thanks. > > > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---