Tiago Almeida
Tiago Almeida

Reputation: 14237

Using a bluetooth sound device in iOS7 without microphone permissions

With the iOS7 the AudioSession Category AVAudioSessionCategoryPlayAndRecord asks for Microphone permission. However, that permission doesn't feel right if I only need to support bluetooth for external audio. There are some people that are in the same situation as I am right now, but I can't find an answer for this.

In iOS6 I was using this code to route the sound to bluetooth devices:

[[AVAudioSession sharedInstance] setDelegate:self];
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord 
                                       error:&sessionError];

AudioSessionSetActive (true);

UInt32 audioCategory = kAudioSessionCategory_MediaPlayback;

AudioSessionSetProperty (kAudioSessionProperty_AudioCategory, 
                         sizeof (audioCategory), &audioCategory);

Is there any way to support a bluetooth device without using a audio session category that asks the user permission to use the microphone?

PS: I have noticed that google does the same with maps and youtube. Is it possible that we can't get around this issue on iOS7?

Upvotes: 2

Views: 767

Answers (1)

guyh92
guyh92

Reputation: 383

The "Allow app to use Microphone" prompt has been put in place to give the user more confidence in what the application is interfacing with. There will be no way to get around this.

You can however respond on the event of the user denying access. This might help:

How to detect microphone input permission refused in iOS 7

Upvotes: 0

Related Questions