开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜