Detect Silent mode in iOS5?

谁说我不能喝 提交于 2019-11-26 22:33:07
Oliver

We won't be able to detect the silent switch state anymore since iOS 5...

The answer from Apple is there on the accepted answer : Detecting the iPhone's Ring / Silent / Mute switch using AVAudioPlayer not working?

Alon Amir

As mentioned in the iOS Developer Library, the property kAudioSessionProperty_AudioRoute is deprecated. Instead, Use the kAudioSessionProperty_AudioRouteDescription

https://developer.apple.com/library/ios/#documentation/AudioToolbox/Reference/AudioSessionServicesReference/Reference/reference.html

This question has been answered here: Detecting the iPhone's Ring / Silent / Mute switch using AVAudioPlayer not working?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!