語言

NotificationManager.SetInterruptionFilter(InterruptionFilter) 方法

定義

設定目前的通知中斷過濾器。

[Android.Runtime.Register("setInterruptionFilter", "(I)V", "", ApiSince=23)]
public void SetInterruptionFilter(Android.App.InterruptionFilter interruptionFilter);
[<Android.Runtime.Register("setInterruptionFilter", "(I)V", "", ApiSince=23)>]
member this.SetInterruptionFilter : Android.App.InterruptionFilter -> unit

參數

interruptionFilter
InterruptionFilter

int:價值是以下之一:INTERRUPTION_FILTER_NONE INTERRUPTION_FILTER_PRIORITY INTERRUPTION_FILTER_ALARMS INTERRUPTION_FILTER_ALL INTERRUPTION_FILTER_UNKNOWN

屬性

備註

設定目前的通知中斷過濾器。 中斷過濾器定義哪些通知可以打斷使用者(例如聲音和震動),並且是全域套用的。 針對Build.VERSION_CODES的應用程式。VANILLA_ICE_CREAM 及以上(有些例外,例如伴隨裝置管理器)無法修改全域中斷過濾器。 呼叫此方法會啟用或停用與應用程式相關的 AutomaticZenRule,使用與 setNotificationPolicy(Policy) 提供的政策對應的 ZenPolicy(或未提供時的全域政策)。 只有在獲得此套件政策存取權時才可用。 請參見 isNotificationPolicyAccessGranted()。

Android 參考資料。android.app.NotificationManager.setInterruptionFilter

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於