2011-11-21 27 views
4

可能重複:
Can an iOS app switch the device to silent mode?如何忽略一個iPhone編程

我新的iPhone應用開發,我想提出鈴聲和提示音我的iPhone靜音模式。
這是可能的,因爲我在應用所看到「AutoSilent

+1

我認爲它是一個重複的問題http://stackoverflow.com/questions/7828958/is-there-a-method-that-c​​an-be-used-by-an-ios-application-to-programmatically-swi –

+0

嘗試引用SO以前的帖子,你一定會得到解決方案... http://stackoverflow.com/questions/287543/how-to-programmatically-sense-the-iphone-mute-switch http:// stackoverflow。 com/questions/833304/how-to-detect-iphone-is-on-silent-mode http://stackoverflow.com/questions/6901363/detecting-the-iphones-ring-silent-mute-switch-using-avaudioplayer -not-worki http://stackoverflow.com/questions/8158087/detecting-iphone-mute-switch-in-ios-5希望這會幫助你... – DShah

+1

@DShah - 這些鏈接是關於「如何檢測「,而不是如何設置。 – Kev

回答

0

有這個沒有公共API,因爲它影響的應用程序沙箱的東西外側。

某些版本的iOS報告有錯誤,如果您的應用以某種方式播放聲音,則可能會阻止某些提示音。