Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to programmatically mute the iPhone?

Tags:

iphone

volume

I've seen techniques to make sure that an app respects the mute switch, but is it possible to set the iPhone to mute (no sounds from any apps) using the SDK?

like image 878
lajos Avatar asked Feb 27 '09 22:02

lajos


4 Answers

No.

Applications developed using the official SDK cannot change (and in most cases cannot even access) system-wide settings.

like image 51
Andrew Grant Avatar answered Oct 06 '22 01:10

Andrew Grant


It is possible, but only using private API's. I only went as far as muting the ringer, but you should be able to control the master level as well.

See How to disable iOS System Sounds

like image 20
Sam Avatar answered Oct 06 '22 00:10

Sam


It is technically possible to change the system volume through the private AVSystemController class in Celestial.framework, but will prevent your app from getting Apple's approval

like image 40
rpetrich Avatar answered Oct 06 '22 00:10

rpetrich


As only one app can be running at a time, the only possible use I can think of for this would be to mute other people's apps, and it should be fairly clear why Apple prevents that.

What would I do if an app muted the iPhone and I didn't know it happened? It can't physically move the mute switch on the side of the phone, so that wouldn't match, and I'd have to figure out a) that the phone was muted and b) how to unmute it without the switch.

like image 27
ceejayoz Avatar answered Oct 06 '22 00:10

ceejayoz