Sdílet prostřednictvím


NotificationChannel.Blockable Property

Definition

Returns whether this channel is always blockable, even if the app is 'fixed' as non-blockable. -or- Allows users to block notifications sent through this channel, if this channel belongs to a package that otherwise would have notifications "fixed" as enabled.

public bool Blockable { [Android.Runtime.Register("isBlockable", "()Z", "", ApiSince=33)] get; [Android.Runtime.Register("setBlockable", "(Z)V", "", ApiSince=33)] set; }
[<get: Android.Runtime.Register("isBlockable", "()Z", "", ApiSince=33)>]
[<set: Android.Runtime.Register("setBlockable", "(Z)V", "", ApiSince=33)>]
member this.Blockable : bool with get, set

Property Value

Attributes

Remarks

Property getter documentation:

Returns whether this channel is always blockable, even if the app is 'fixed' as non-blockable.

Java documentation for android.app.NotificationChannel.isBlockable().

Property setter documentation:

Allows users to block notifications sent through this channel, if this channel belongs to a package that otherwise would have notifications "fixed" as enabled.

If the channel does not belong to a package that has a fixed notification permission, this method does nothing, since such channels are blockable by default and cannot be set to be unblockable.

Java documentation for android.app.NotificationChannel.setBlockable(boolean).

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