According to what I've read from other threads, you can't override the
home key behavior.
But I just found some interesting part of the Activity's
documentation:

 public boolean isFinishing()
Check to see whether this activity is in the process of finishing,
either because you called finish() on it or someone else has requested
that it finished. This is often used in onPause() to determine whether
the activity is simply pausing or completely finishing.


On Nov 24, 2:03 am, Cool Frood <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to create an app that needs to do this:
>
> a) Hold the PARTIAL_WAKE_LOCK in the "started" mode so that it
> continues to work even if the screen goes off (it is a sound-based
> application)
> b) May or may not turn off the sound when the home key is pressed.
> Either way is fine with me.
> c) Turns off the sound when the back key is pressed.
>
> The problem that I am running into is that I can satisfy c) by turning
> off the sound and releasing the PARTIAL_WAKE_LOCK in either onPause()
> or onStop().  However, onPause() is also called when the screen shuts
> off, so I cannot satisfy c).  Is there some combination of hooks to
> write so that I can distinguish between the back key and the screen
> turning off?
>
> Thanks,
> Akshat
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
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