Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get silent switch status in iOS5

I found out "Silent switch" status of Device using "AudioSessionGetProperty" before [iOS5] released.

CFStringRef route;
UInt32 propertySize = sizeof(CFStringRef);
AudioSessionInitialize(NULL, NULL, NULL, NULL);
AudioSessionGetProperty(kAudioSessionProperty_AudioRoute, &propertySize, &route);
if(CFStringGetLength(route) == 0) {
     // Silent Mode
}

Now, I'd like to know how to get "silent switch" status in "iOS5"

like image 399
user1000213 Avatar asked Oct 18 '11 00:10

user1000213


People also ask

How do I turn Silent mode on?

To turn on silent mode: Tap the lower part of the Volume key until the silent mode icon is displayed. If vibration is turned on, silent mode isn't turned on when you tap the Volume key. See how to turn vibration on or off.

How do I know if I have Silent mode?

Press the "Up" volume button on the Android phone until the Silent Mode icon on the screen changes. The Silent Mode icon looks like a speaker with a line through it or a speaker with circle and a line superimposed over it. When the Silent Mode is disabled, only a speaker icon appears.

Can I disable silent switch on iPhone?

All iPhones and some iPads have a ring / silent switch on the left side of the device (above the volume buttons). Move the switch in way that the switch does not have an orange background color as the image below. Pushing it towards you will turn off silent mode.

Why is there a silent switch on iPhone?

The Ring/Silent switch is on the left-hand side of your iPhone. You can use it to control which sounds are played from your iPhone speaker.


1 Answers

It's not possible. I've asked the question directly to Apple using a Developer Technical Support, and they answered me that the way that was made possible prior to iOS 5 was because of a breach, that was corrected in iOS 5. They say it's not made possible anymore, and if we want such a feature, we have to ask for it.

like image 94
Oliver Avatar answered Oct 05 '22 22:10

Oliver