I have an audio playback Android App which politely does a requestAudioFocus() when it starts playing, and abandonAudioFocus() when it stops. Sometimes the user will want to playback a different file in my app, I'd like to be able to check if I already have the audiofocus so that I don't do a request from myself. Looking at documentation for AudioManager I'm not seeing a way to do this -- seems like a rather blatant omission. Does anybody know if there is a way to d开发者_开发知识库etermine if a service already has the audio focus before calling request?
How to tell if already has audio focus?
I have an audio playback Android App which politely does a requestAudioFocus() when it starts playing, and abandonAudioFocus() when it stops.Sometimes the user will want to playback a different file i
0
0
0
精彩评论