guich wrote:
> What is the desired behaviour when the user press the home key? I have
> a situation here that when the home key is pressed and i call my
> application again, it returns as if it was not destroyed (actually,
> onDestroy is indeed not called).

That is to be expected.

> So, is the behaviour:
> 
> 1. when returning to the app, get it as a newly created app
> or
> 2. when returning to the app, return it as it was left

That depends on what happened after HOME was pressed.

If the user comes back to it fairly quickly, it will be the same
activity instance.

If the user leaves it for an extended period, the activity instance may
be destroyed to reclaim RAM.

> As a side note, is there a way to know that the home key was pressed?
> I don't want to intercept it, i just want to know it was pressed.

No, sorry.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 2.0 Available!

-- 
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

Reply via email to