Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to programmatically silence the ringer or change the ringer tone on iOS5

Is there a way to reduce the volume of the ringer or change the ringer tone on iOS5?

I checked out the Celestial framework, but can't instantiate AVSystemController. :-(

I don't care if this get's the app rejected in the AppStore as it will never be submitted.

like image 861
cfischer Avatar asked Feb 16 '12 23:02

cfischer


1 Answers

Yes. Use AVSystemController. You don't instantiate it. It's a singleton.

http://code.google.com/p/iphone-dev/source/browse/trunk/include/include/Celestial/AVSystemController.h?r=136

[[AVSystemController sharedAVSystemController] setVolumeTo:10.0 forCategory:@"Ringtone"];
like image 113
edc1591 Avatar answered Oct 05 '22 11:10

edc1591