NotificationCompat.BubbleMetadata
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 |
|---|
|
Builder to construct a |
Public functions |
|
|---|---|
java-static NotificationCompat.BubbleMetadata? |
fromPlatform(platformMetadata: Notification.BubbleMetadata?)Converts a platform-level |
Boolean |
|
PendingIntent? |
|
@Dimension(unit = 0) Int |
|
@DimenRes Int |
|
IconCompat? |
getIcon() |
PendingIntent? |
|
String? |
|
Boolean |
|
java-static Notification.BubbleMetadata? |
toPlatform(compatMetadata: NotificationCompat.BubbleMetadata?)Converts a |
Public functions
fromPlatform
java-static fun fromPlatform(platformMetadata: Notification.BubbleMetadata?): NotificationCompat.BubbleMetadata?
Converts a platform-level Notification.BubbleMetadata to a NotificationCompat.BubbleMetadata.
| Parameters | |
|---|---|
platformMetadata: Notification.BubbleMetadata? |
the |
| Returns | |
|---|---|
NotificationCompat.BubbleMetadata? |
a |
getAutoExpandBubble
fun getAutoExpandBubble(): Boolean
| Returns | |
|---|---|
Boolean |
whether this bubble should auto expand when it is posted. |
| See also | |
|---|---|
setAutoExpandBubble |
getDeleteIntent
fun getDeleteIntent(): PendingIntent?
| Returns | |
|---|---|
PendingIntent? |
the pending intent to send when the bubble is dismissed by a user, if one exists. |
getIcon
fun getIcon(): IconCompat?
| Returns | |
|---|---|
IconCompat? |
the icon that will be displayed for this bubble when it is collapsed, or null if the bubble is created via |
getIntent
fun getIntent(): PendingIntent?
| Returns | |
|---|---|
PendingIntent? |
the pending intent used to populate the floating window for this bubble, or null if this bubble is created via |
isNotificationSuppressed
fun isNotificationSuppressed(): Boolean
| Returns | |
|---|---|
Boolean |
whether this bubble should suppress the notification when it is posted. |
| See also | |
|---|---|
setSuppressNotification |
toPlatform
java-static fun toPlatform(compatMetadata: NotificationCompat.BubbleMetadata?): Notification.BubbleMetadata?
Converts a NotificationCompat.BubbleMetadata to a platform-level Notification.BubbleMetadata.
| Parameters | |
|---|---|
compatMetadata: NotificationCompat.BubbleMetadata? |
the NotificationCompat.BubbleMetadata to convert |
| Returns | |
|---|---|
Notification.BubbleMetadata? |
a |