I have a Xamarin.Forms
application running on both iOS and Android currently I have discovered an issue with playing sounds inside my app while there is background audio already playing. iOS was easy enough to solve by detecting the presence of AVAudioSession.SharedInstance().OtherAudioPlaying
.
I am stumped on whether it is possible to detect if anything is already playing audio on Android. I seem to be able to discover how to play audio in the background but nothing on how to check if there is existing audio playing. Currently both the background audio and my sounds play together which can leave a rather unpleasant experience.