2

How to know the device is in silent or in ring mode in IOS 5?

kAudioSessionProperty_AudioRoute gives "RouteDetailedDescription_PortType" = Speaker

But how to know whether the device is in silent or not?

Thanks, Sai Jithendra

yuji
  • 16,695
  • 4
  • 63
  • 64
Sai Jithendra
  • 439
  • 5
  • 16

2 Answers2

1

kAudioSessionProperty_AudioRoute seems to be deprecated..Use kAudioSessionProperty_AudioRouteDescription instead.. See this thread

Community
  • 1
  • 1
Krishnabhadra
  • 34,169
  • 30
  • 118
  • 167
  • Thanks for quick reply Krishnabhadra. BUT, in that thread there is no solution for detecting device in silent ! am I missed something? Thanks in advance – Sai Jithendra Nov 02 '11 at 14:52
0

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?

Community
  • 1
  • 1
Oliver
  • 23,072
  • 33
  • 138
  • 230