NotificationCompat.BubbleMetadata.Builder

public final class NotificationCompat.BubbleMetadata.Builder


Builder to construct a BubbleMetadata object.

Summary

Public constructors

This method is deprecated.

use Builder for a bubble created via a ShortcutInfoCompat or Builder for a bubble created via a PendingIntent.

Builder(@NonNull String shortcutId)

Creates a BubbleMetadata.Builder based on a ShortcutInfoCompat.

Creates a BubbleMetadata.Builder based on the provided intent and icon.

Public methods

@NonNull NotificationCompat.BubbleMetadata

Creates the BubbleMetadata defined by this builder.

@NonNull NotificationCompat.BubbleMetadata.Builder
setAutoExpandBubble(boolean shouldExpand)

If set and the app creating the bubble is in the foreground, the bubble will be posted in its expanded state, with the contents of getIntent in a floating window.

@NonNull NotificationCompat.BubbleMetadata.Builder

Sets an optional intent to send when this bubble is explicitly removed by the user.

@NonNull NotificationCompat.BubbleMetadata.Builder
setDesiredHeight(@Dimension(unit = "") int height)

Sets the desired height in DPs for the app content defined by setIntent, this height may not be respected if there is not enough space on the screen or if the provided height is too small to be useful.

@NonNull NotificationCompat.BubbleMetadata.Builder
setDesiredHeightResId(@DimenRes int heightResId)

Sets the desired height via resId for the app content defined by setIntent, this height may not be respected if there is not enough space on the screen or if the provided height is too small to be useful.

@NonNull NotificationCompat.BubbleMetadata.Builder

Sets the icon for the bubble.

@NonNull NotificationCompat.BubbleMetadata.Builder

Sets the intent that will be used when the bubble is expanded.

@NonNull NotificationCompat.BubbleMetadata.Builder