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. Adc2 Demo Game

Hi all,
I'm finishing to write my game and i'm thinking to partecipate to the
ADC2. Since I also want to start selling the game to the android
market asap, I want to know if is it possible to make a free demo
version of the game to be used for the contest and a full paid version
that is available to users that want to buy it before the contest has
finished. Is it a violation of TOS or it can be done at my own risk
(because the demo valued by judges is not the complete version)?
Thanks
--~--~---------~--~----~------------~-------~--~----~

2. ant and eclipse builds don't play nice

Hi,

I use ant to do release builds, and eclipse to do all my debug builds.
With the new 1.5 sdk, my build.xml overides the resource-src target in
order to perform some additional tasks, and it then depends on
android_rules.resource-src to get the proper toolchain behaviour:

e.g.
...
<setup />
<target name="resource-src" depends="my-own-target,
android_rules.resource-src" />
...

This works well for ant, but eclipse doesn't seem to know where
android_rules comes from (not surprising since it is dynamically
imported via code), and thus says there is an error in the file. This
in turn stops the entire android project from building.

So I need to either somehow get eclipse to parse the build.xml
properly, or better still, get eclipse to ignore the build.xml
altogether since build.xml takes no part in the eclipse build.

Any ideas?

thanks,
Craig
--~--~---------~--~----~------------~-------~--~----~

3. Is it possible to override Android's green and red buttons?

4. Android DRM support

5. How can I use google API in target board.

6. How to reuse APL2.0 licensed code correctly?

7. 绛斿: fillpolygon for Canvas?