AVAudioSession switching speaker from receiver speaker to iPhone speaker - ios

I am using AVAudioSession for VOIP and sometimes when the app goes to the background or the volume gets adjusted the speaker switches from the earpiece speaker to the main iPhone speakers. It is almost randomly doing this. Trying to figure out what is causing this. Any help would be greatly appreciated.
Thank you!

Related

How to control BLE speakers with iOS app programmaticaly?

I have BLE supported speakers which can get connected with iOS device via BLE. I wanted to get the events of speakers such as volume up/down, play/pause in iOS device programmatically. Can anyone please suggest me whats the logic behind this and how can I proceed to achieve the same.
Thanks in advance!

How to play music in my app to a bluetooth enabled speaker through a2dp?

I want to play the audio which is located in my app to a bluetooth enabled speaker device. How can it be done using the core bluetooth library of ios. Any help will be greatly appreciated. Thanks!

Reroute iPhone speaker sound to Bluetooth speaker

I have to implement one iOS app i.e reroute sound from iPhone speaker to Bluetooth speaker. I have searched and got one sample link. In this sample whatever you say in the mic, that sound comes from the speaker. But my requirement is I have to reroute the speaker sound to Bluetooth speaker. Still trying to implement it. Any ideas/suggestions could be very grateful.

IOS app - bluetooth audio enabling

I'm working on an IOS 6 app that's currently in development. The app has about 5-6 snippets of audio that play at various stages, currently when the device is paired with some bluetooth speakers (e.g. in a car) the audio does not play through the speakers.
Does anyone know what's involved with making this app work with paired bluetooth speakers? My initial assumption was that it wouldn't need anything extra done, it would just work. I had thought bluetooth paired speakers worked like as if you'd plugged in speakers directly into the device, all audio was routed through the speakers as long as they were paired.
This doesn't appear to be the case though.
I think you have to place an MPVolumeView somewhere in your interface, and enable the showsRouteButton property, then users can use that button to change the audio route to Bluetooth. You can also disable the showsVolumeSlider property if you don't need the volume slider.

Music plays when volume turn off

I have next issue:
I use AudioServicesPlaySystemSound to play short sound in my app. But something happens wrong: when I turn off volume on the device - sound still playing.
I found this issue on devices with iOS 6.0 and greater. On iOS 5 device all right.
Can anybody point me what I do wrong?
Thanks.

Resources