Hi Dianne, Could you pls be more specific and indicate the method? Is it not 'moveTaskToBack'?
Thanks On Fri, Dec 12, 2008 at 3:45 AM, Dianne Hackborn <[email protected]>wrote: > There is a method on Activity to send your task to the background. > > On Thu, Dec 11, 2008 at 8:43 AM, sthustfo <[email protected]> wrote: > >> 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. >>> > >>> > >>> > >>> > > >>> > >>> >>> >>> >> >> >> > > > -- > Dianne Hackborn > 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 -~----------~----~----~----~------~----~------~--~---

