Notification.BubbleMetadata.Builder.SetIcon(Icon) Method

Definition

Sets the icon for the bubble.

[Android.Runtime.Register("setIcon", "(Landroid/graphics/drawable/Icon;)Landroid/app/Notification$BubbleMetadata$Builder;", "", ApiSince=29)]
public Android.App.Notification.BubbleMetadata.Builder SetIcon(Android.Graphics.Drawables.Icon icon);
[<Android.Runtime.Register("setIcon", "(Landroid/graphics/drawable/Icon;)Landroid/app/Notification$BubbleMetadata$Builder;", "", ApiSince=29)>]
member this.SetIcon : Android.Graphics.Drawables.Icon -> Android.App.Notification.BubbleMetadata.Builder

Parameters

icon
Icon

Icon: This value cannot be null.

Returns

This Android.App.Notification.BubbleMetadata.Builder instance, allowing calls to be chained.

Attributes

Remarks

Sets the icon for the bubble. Can only be used if the bubble was created via Builder.Builder(PendingIntent,Icon). The icon will be used to represent the bubble when it is collapsed. An icon should be representative of the content within the bubble. If your app produces multiple bubbles, the icon should be unique for each of them.

It is recommended to use an Icon of type Icon.TYPE_URI or Icon.TYPE_URI_ADAPTIVE_BITMAP

Throws: IllegalStateException if this builder was created via Builder.Builder(String).

Throws: NullPointerException if icon is null.

Android reference for android.app.Notification.BubbleMetadata.Builder.setIcon.

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