2

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?

Tiago Almeida
  • 14,081
  • 3
  • 67
  • 82

1 Answers1

0

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

Community
  • 1
  • 1
guyh92
  • 383
  • 1
  • 4
  • 16
  • Well, that could help if I would accept this solution. The fact is that I didn't find a way to reproduce on bluetooth (automatically) without that audio session category. But maybe is another way to reproduce it on iOS7? I am trying to update my solution. – Tiago Almeida Sep 20 '13 at 14:18