NotificationManager.SetInterruptionFilter(InterruptionFilter) Method

Definition

Sets the current notification interruption filter.

[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

Parameters

interruptionFilter
InterruptionFilter

int: Value is one of the following: INTERRUPTION_FILTER_NONE INTERRUPTION_FILTER_PRIORITY INTERRUPTION_FILTER_ALARMS INTERRUPTION_FILTER_ALL INTERRUPTION_FILTER_UNKNOWN

Attributes

Remarks

Sets the current notification interruption filter. The interruption filter defines which notifications are allowed to interrupt the user (e.g. via sound & vibration) and is applied globally. Apps targeting Build.VERSION_CODES.VANILLA_ICE_CREAM and above (with some exceptions, such as companion device managers) cannot modify the global interruption filter. Calling this method will instead activate or deactivate an AutomaticZenRule associated to the app, using a ZenPolicy that corresponds to the Policy supplied to setNotificationPolicy(Policy) (or the global policy when one wasn't provided). Only available if policy access is granted to this package. See isNotificationPolicyAccessGranted().

Android reference for android.app.NotificationManager.setInterruptionFilter.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to