Why different behaviour when exiting app using BACK and HOME ?

by Jean-Baptiste Queru » Thu, 05 Mar 2009 21:58:02 GMT


Sponsored Links
 The default behavior of the back key is to exit your activity by
calling finish() (which should pop to the next activity in the
activity stack of the task your activity was in, or to another task if
your activity was at the bottom of its task). You can override that.

The behavior of the home key is to switch to the home application, but
your activity doesn't exit.

JBQ






-- 
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

--~--~---------~--~----~------------~-------~--~----~



Why different behaviour when exiting app using BACK and HOME ?

by Jean-Baptiste Queru » Fri, 06 Mar 2009 05:10:04 GMT


 You can capture the back key and make it do whatever you want.

JBQ








-- 
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Why different behaviour when exiting app using BACK and HOME ?

by Marco Nelissen » Fri, 06 Mar 2009 06:22:27 GMT


 ctivity.onKeyDown()


On Thu, Mar 5, 2009 at 2:11 PM, TAKEphONE <shimo...@gmail.com> wrote:

--~--~---------~--~----~------------~-------~--~----~



Why different behaviour when exiting app using BACK and HOME ?

by Dianne Hackborn » Fri, 06 Mar 2009 07:02:22 GMT


 ut, you know, changing your app to be inconsistent with the standard app
model used by the system is generally not a good idea.

Every app I download that doesn't let me press back to get out of it has a
special little black spot in my heart.

On Thu, Mar 5, 2009 at 2:55 PM, TAKEphONE <shimo...@gmail.com> wrote:



--
Dianne Hackborn
Android framework engineer
hack...@android.com

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.

--~--~---------~--~----~------------~-------~--~----~



Why different behaviour when exiting app using BACK and HOME ?

by Dianne Hackborn » Fri, 06 Mar 2009 07:42:47 GMT


 




To be fair, the browser is basically emulating an activity stack within a
single activity, so it makes sense for it to steal the back key in certain
situations to do that behavior.

But sometimes it does the wrong thing, and is very annoying.

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. how to implement an application like netcounter?

hi all:
      i want to implement an application like netcounter,but I can not find
the APIS      how to get the infomation the net node such as ppp0/wifi/usb0?
      how to know the current net node which network is using and the bytes
of the downloa data?

thanks!

--~--~---------~--~----~------------~-------~--~----~

2. Question on the BlogPost of ListView posted by Romanian Guy

Thanks for the information Romain !







--~--~---------~--~----~------------~-------~--~----~

3. keypad Mapping to enter alphabets on omapzoom

4. Is it possible to put more than 2 video players in one activity?

5. Delay in phone responsiveness after web browsing

6. what the ScanResult.capabilities actually is?

7. Android on OMAP35x ?