How to determine if audio system in use by another resource? | developer.brewmp.com How to determine if audio system in use by another resource? | developer.brewmp.com

Developer

How to determine if audio system in use by another resource?

Forums:

I'm experiencing two scenarios with audio in
use. 

1. A phone call comes in and suspends my
application. While the user is still in the phone call, they swap in the
application. My application plays audio mixed with the phone call. How should I
go about determining if there's a phone call in progress? Is there a callback
mechanism I can use to get notified of state changes so I and stop/start audio? 

2. A music player is running in the background.
How should I determine if another app is currently playing music?