Only a small set of buttons can be handled in the background via the
broadcasts you found.  There is deliberately no facility for applications to
see any arbitrary input when they are not directly interacting with the
user.

On Wed, Dec 2, 2009 at 2:18 AM, pedramz <[email protected]> wrote:

> Hi,
>
> I am planning to port an application from Symbian to Android and I'm
> looking at the possibilities of the Android platform.
>
> My application runs in background and needs to detect when the user
> presses and holds a button (for 3-4 seconds) on the phone even when
> the phones key lock is on.
>
> I am in the process of learning Android programming but so far what I
> understand is that if my application runs as a service it would be
> able to receive broadcast such as ACTION_MEDIA_BUTTON. Am I looking in
> the right direction?
>
> I had a quick look at the list of native android broadcast actions and
> I could only find broadcast actions for Camera, Media and Call
> buttons. What about the other buttons?
>
> Thanks,
>
> Pedram
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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