Exit option on Android 2.1

49 views
Skip to first unread message

Geoffrey

unread,
Mar 9, 2010, 3:49:48 PM3/9/10
to SteelAndroid
I've recently upgraded from HTC Magic to Nexus One.

Now, when I long press 'BACK' button, I briefly see the exit dialog
box.

I cannot confirm the exit.

Does it really quit the application ?

kolbysoft

unread,
Mar 9, 2010, 4:09:56 PM3/9/10
to SteelAndroid
Geoffrey,

yes, the issue is related to the way Android of different versions
handles the hard keys differently (apparently from 2.0 onwards it
matters if it's a soft or a hard key). Here is the story from the
android developer blog:
http://android-developers.blogspot.com/2009/12/back-and-other-hard-keys-three-stories.html

As a developer it is very frustrating to have new versions break old
code, but that's essentially what happened with every new version of
Android, and I haven't had time yet to even try to understand all the
different ways in which I'm now supposed to check for something as
simple as a long-press on the back key.

When the app is terminated with the long press, it exits, within the
limits of Android, meaning, it may exit, or it may not ;)

Sorry,
Michael

Geoffrey

unread,
Mar 13, 2010, 10:37:53 AM3/13/10
to SteelAndroid
And what about an 'Exit' menu option ?

On 9 mar, 22:09, kolbysoft <kolbys...@gmail.com> wrote:
> Geoffrey,
>
> yes, the issue is related to the way Android of different versions
> handles the hard keys differently (apparently from 2.0 onwards it
> matters if it's a soft or a hard key). Here is the story from the

> android developer blog:http://android-developers.blogspot.com/2009/12/back-and-other-hard-ke...

Geoffrey

unread,
Mar 13, 2010, 4:19:43 AM3/13/10
to SteelAndroid
Ok,

I just looked at the doc and it's very confusing :S

Regarding this page it seems that the behaviour doesn't change if the
target version is < 5.

For now, I'm assuming the app is closed when I long press BACK :)

On 9 mar, 22:09, kolbysoft <kolbys...@gmail.com> wrote:

> Geoffrey,
>
> yes, the issue is related to the way Android of different versions
> handles the hard keys differently (apparently from 2.0 onwards it
> matters if it's a soft or a hard key). Here is the story from the

> android developer blog:http://android-developers.blogspot.com/2009/12/back-and-other-hard-ke...

Reply all
Reply to author
Forward
0 new messages