NotificationListenerService.CurrentInterruptionFilter Property

Definition

Gets the current notification interruption filter active on the host.

public Android.Service.Notification.InterruptionFilterType CurrentInterruptionFilter { [Android.Runtime.Register("getCurrentInterruptionFilter", "()I", "")] get; }
[<get: Android.Runtime.Register("getCurrentInterruptionFilter", "()I", "")>]
member this.CurrentInterruptionFilter : Android.Service.Notification.InterruptionFilterType

Property Value

One of the INTERRUPTION_FILTER_ constants, or INTERRUPTION_FILTER_UNKNOWN when unavailable.

Attributes

Remarks

Gets the current notification interruption filter active on the host.

The interruption filter defines which notifications are allowed to interrupt the user (e.g. via sound &amp; vibration) and is applied globally. Listeners can find out whether a specific notification matched the interruption filter via Ranking#matchesInterruptionFilter().

The current filter may differ from the previously requested filter if the notification host does not support or refuses to apply the requested filter, or if another component changed the filter in the meantime.

Listen for updates using #onInterruptionFilterChanged(int).

The service should wait for the #onListenerConnected() event before performing this operation.

Java documentation for android.service.notification.NotificationListenerService.getCurrentInterruptionFilter().

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