Audio stops when playing over bluetooth and when in background

My app is programmed to play audio in the background. A user can for example listen to music with Spotify while my app is running in the background. When entering a certain region, my app starts playing audio and ducks Spotify. This worked fine until I tried the following scenario:
  • Connect iPhone to car audio system with bluetooth

  • Listen to Spotify

  • My app is running in the background

  • My app downloads the audio with 4G from the internet

I experienced the following:
  • Streaming of Spotify music works fine

  • When my app enters the region, the audio starts but stops after a couple of seconds.

  • After that, audio seems to be messed up. Sometimes I can resume it, sometimes not, also the other app's audio sometimes does not play anymore.

I experienced this in 3 different cars. When my app is the only app playing audio, it works fine. When connecting my app with USB or AUX it works fine in all cases (my app in foreground/background and other audio playing).

Any help would be greatly appreciated. Thanks in advance.

Best regards
Rony

Audio stops when playing over bluetooth and when in background
 
 
Q