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 <[email protected]> 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 <[email protected]> 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 [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 > > -- > 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.- 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 [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

