NotificationCompat.BubbleMetadata
public final class NotificationCompat.BubbleMetadata
Encapsulates the information needed to display a notification as a bubble.
A bubble is used to display app content in a floating window over the existing foreground activity. A bubble has a collapsed state represented by an icon, setIcon and an expanded state which is populated via setIntent.
| See also | |
|---|---|
setBubbleMetadata |
Summary
Nested types |
|---|
public final class NotificationCompat.BubbleMetadata.BuilderBuilder to construct a |
Public methods |
|
|---|---|
static @Nullable NotificationCompat.BubbleMetadata |
fromPlatform(@Nullable Notification.BubbleMetadata platformMetadata)Converts a platform-level |
boolean |
|
@Nullable PendingIntent |
|
@Dimension(unit = 0) int |
|
@DimenRes int |
|
@Nullable IconCompat |
getIcon() |
@Nullable PendingIntent |
|
@Nullable String |
|
boolean |
|
static @Nullable Notification.BubbleMetadata |
toPlatform(@Nullable NotificationCompat.BubbleMetadata compatMetadata)Converts a |
Public methods
fromPlatform
public static @Nullable NotificationCompat.BubbleMetadata fromPlatform(@Nullable Notification.BubbleMetadata platformMetadata)
Converts a platform-level Notification.BubbleMetadata to a NotificationCompat.BubbleMetadata.
| Parameters | |
|---|---|
@Nullable Notification.BubbleMetadata platformMetadata |
the |
| Returns | |
|---|---|
@Nullable NotificationCompat.BubbleMetadata |
a |
getAutoExpandBubble
public boolean getAutoExpandBubble()
| Returns | |
|---|---|
boolean |
whether this bubble should auto expand when it is posted. |
| See also | |
|---|---|
setAutoExpandBubble |
getDeleteIntent
public @Nullable PendingIntent getDeleteIntent()
| Returns | |
|---|---|
@Nullable PendingIntent |
the pending intent to send when the bubble is dismissed by a user, if one exists. |
getIcon
public @Nullable IconCompat getIcon()
| Returns | |
|---|---|
@Nullable IconCompat |
the icon that will be displayed for this bubble when it is collapsed, or null if the bubble is created via |
getIntent
public @Nullable PendingIntent getIntent()
| Returns | |
|---|---|
@Nullable PendingIntent |
the pending intent used to populate the floating window for this bubble, or null if this bubble is created via |
isNotificationSuppressed
public boolean isNotificationSuppressed()
| Returns | |
|---|---|
boolean |
whether this bubble should suppress the notification when it is posted. |
| See also | |
|---|---|
setSuppressNotification |
toPlatform
public static @Nullable Notification.BubbleMetadata toPlatform(@Nullable NotificationCompat.BubbleMetadata compatMetadata)
Converts a NotificationCompat.BubbleMetadata to a platform-level Notification.BubbleMetadata.
| Parameters | |
|---|---|
@Nullable NotificationCompat.BubbleMetadata compatMetadata |
the NotificationCompat.BubbleMetadata to convert |
| Returns | |
|---|---|
@Nullable Notification.BubbleMetadata |
a |