How to detect whether the system music player is playing on Android?

(Malte Thiesen) #1

We want to detect whether a user is playing music on the system music player and mute our own music in that case. The iOS version of FMOD provides FMOD_IPhone_OtherAudioIsPlaying, the Android version however does not seem to provide a similar option.

I tried to use AudioManager.isMusicActive() but this also considers FMOD a music source and always returns true.

(Mathew Block) #2

You might need to check the music state before initializing FMOD with Android, I don’t think there is a way to distinguish the two once FMOD is playing.