Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
635 views
in Technique[技术] by (71.8m points)

iphone - 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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"];

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...