在iOS7使用蓝牙音频设备没有麦克风权限 [英] Using a bluetooth sound device in iOS7 without microphone permissions

查看:1054
本文介绍了在iOS7使用蓝牙音频设备没有麦克风权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

随着iOS7的AudioSession类别 AVAudioSessionCategoryPlayAndRecord 要求麦克风的权限。但是,如果我只需要支持蓝牙外接音频的权限感觉不对。有一些人是在同样的情况,因为我的权利,但我可以T找到这个答案。

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.

在iOS6的我就是用这个code到声音传送至蓝牙设备:

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);

有没有办法为支持蓝牙设备没有使用,要求使用麦克风的用户权限的音频会话类别?

PS:我已经注意到,谷歌确实与地图和YouTube一样的。难道我们不能解决此问题得到iOS7?

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?

推荐答案

允许应用程序使用麦克风的提示已经到位,给用户以何种应用程序是用接口更有信心。将有没有办法解决这个问题。

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:

<一个href=\"http://stackoverflow.com/questions/18625738/ios-7-microphone-input-permission-refused-how-to-detect\">iOS 7 - 麦克风输入许可拒绝 - 如何检测

这篇关于在iOS7使用蓝牙音频设备没有麦克风权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆