1

I am working to play some voice messages from iPhone to car bluetooth audio and are testing with Lexus RX350, which supports A2DP and HFP. In our case, A2DP is preferred. However, I can only hear the sound when car is using bluetooth as audio source. When listening to CD or radio, no sound from iPhone is actually played over car audio system. So, what I want to do is:

  1. Use A2DP when bluetooth is the active audio source
  2. Otherwise use HFP

I use AVAudioPlayer to play audio with AVAudioSessionCategoryPlayback as audio session category. It will always succeed as long as the bluetooth connection is established, no matter whether the car audio is on radio, CD or bluetooth. There is no route change notification when switch between audio sources, therefore I don’t know when we shall switch to HFP. Any suggestions?

Btw, music players like Spotify, Pandora, will pause when switch away from bluetooth audio and resume when switch back, Google Maps will use A2DP when bluetooth audio is active and use HFP if not, so I think there should be a way to detect the change

Leo
  • 11
  • 3
  • have a look at this question: http://stackoverflow.com/questions/14601517/ios-using-bluetooth-audio-output-kaudiosessionproperty-overridecategoryenableb – jaket May 01 '15 at 08:56
  • Thank you for your reply, Jaket. I had read that post before. It doesn't help my problem. I prefer to use A2DP and only switch to HFP when the car is NOT on bluetooth. The problem is, I don't know what audio source the car is using (CD, radio, or bluetooth), so don't know when to trigger the switch – Leo May 01 '15 at 16:18

0 Answers0