[android-developers] Re: Can an Android app have exclusive access to the audio h/w?
Yes, but the audio focus request can be turned down by the system or
may be unsuccessful due to other reasons.
On Mar 23, 2:31 pm, Dianne Hackborn <hack...@android.com> wrote:
> The supported way to do with this scenario is by requesting audio focus:
>
> http://developer.android.com/reference/android/media/AudioManager.htm...,
> int, int)
>
>
>
>
>
> On Fri, Mar 23, 2012 at 12:09 PM, dharmveer <dharmv...@gmail.com> wrote:
> > I am tryingto build an app that will alert the user in case of an
> > emergency by playing an audio file. To override situations where the
> > user may be playing loud music and the emergency announcement may not
> > be heard by the user (due to sharing of audio h/w with multiple apps),
> > can I get exclusive access to audio output so only my audio stream is
> > audible and rest all are stopped/killed/muted? I have tried a lot of
> > googling and studied the sdk documentation but did not find anything
> > that can solve my problem. Thanks for your time.
>
> > --
> > 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
> > android-developers+unsubscribe@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> 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.- Hide quoted text -
>
> - Show quoted text -
--
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
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home