3

I'm trying to monitor the audio focus using this command (pseudo-code)

requestAudioFocus(AudioManager, STREAM_MUSIC, AUDIOFOCUS_GAIN);

at onAudioFocusChange I can recieve all kind of status codes and my problem is that after recieving AUDIOFOCUS_LOSS i'm supposed to abandon the focus even though I want to know when the application that requested it stopped, but after getting AUDIOFOCUS_LOSS you won't get notified even if you dont unregister&abandon the audio focus.

so my question is what can I do to know when that app finished using the audio or get a AUDIOFOCUS_GAIN ?

I'm using API level 15 if that helps.

Thanks in advance for any help or idea.

4

0 回答 0