Don't you have some kind of UI to go along with that sound? It seems kind of
strange to play a sound but not show the user why you're playing that sound.
I would suggest bringing up a UI, and once you have a UI, you can look for
key events.


On Mon, Jun 8, 2009 at 9:41 AM, G <[email protected]> wrote:

>
> I've got a service running that is playing an alarm. Ideally, I'd like
> to stop the alarm playback when one of the volume buttons is pressed
> (just like the regular ringer). I don't think I can override
> dispatchKeyEvent() because it is within a service, but is there any
> type of BroadcastReceiver I can use? i don't want to register it in
> the manifest but rather in the code, as soon as the alarm starts
> playing (and unregister as soon as it stops). Any ideas? I'm kind of
> stumped.
> >
>

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