Reputation: 1739
Is it possible to be notified in Android when the Audio system starts playing audio? it looks like i should wire up a BroadcastReceiver, but it's not clear what i would listen for. I could listen for the MediaPlayer intent, but that would only capture when that particular application was playing audio, not when a third party application played audio, etc.
Any ideas?
Upvotes: 1
Views: 224
Reputation: 1739
Looks like it's only available on android OS 2.2+ (froyo) via the AudioManager.OnAudioFocusChangeListener.
Upvotes: 2
Reputation: 33345
Can you hook into this listener events, for pre 2.2
requestAudioFocus() and abandonAudioFocus()
Upvotes: 0