AVAudioSession multiRoute disables volume buttons

My app is trying to continuously record audio from the background. Due to user feedback, I'm setting the AVAudioSession to use the .multiRoute category and .mixWithOthers options. This is because otherwise, if the device is connected to a car with CarPlay, output from the car's radio is muted.

The only drawback seems to be that in this setup, controlling the phone's volume using the hardware volume buttons doesn't work anymore. This, of course, is also disliked by users.

I've searched the docs and this and other forums for any documentation of this and if there's anything I can do to either setup the session to handle volume changes again or if and how I'm expected to receive notifications of these button presses and how to forward them to the right spot. Unfortunately, I didn't find anything.

Can offer any ideas?

Answered by mss in 791775022

In case anyone else has this problem: I've contacted DTS and they told me that there's currently no way to handle the volume presses in our app. I've since changed my implementation to set the .playAndRecord category for the AVAudioSession.

Accepted Answer

In case anyone else has this problem: I've contacted DTS and they told me that there's currently no way to handle the volume presses in our app. I've since changed my implementation to set the .playAndRecord category for the AVAudioSession.

AVAudioSession multiRoute disables volume buttons
 
 
Q