NotificationCompat.BubbleMetadata
public
static
final
class
NotificationCompat.BubbleMetadata
extends Object
java.lang.Object
|
↳ |
androidx.core.app.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,
NotificationCompat.BubbleMetadata.Builder.setIcon(IconCompat)
and an expanded state which is populated
via NotificationCompat.BubbleMetadata.Builder.setIntent(PendingIntent)
.
Notifications with a valid and allowed bubble will display in collapsed state
outside of the notification shade on unlocked devices. When a user interacts with the
collapsed bubble, the bubble intent will be invoked and displayed.
Summary
Nested classes |
class |
NotificationCompat.BubbleMetadata.Builder
Builder to construct a NotificationCompat.BubbleMetadata object.
|
Inherited methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public methods
getAutoExpandBubble
public boolean getAutoExpandBubble ()
Returns |
boolean |
whether this bubble should auto expand when it is posted. |
getDeleteIntent
public PendingIntent getDeleteIntent ()
Returns |
PendingIntent |
the pending intent to send when the bubble is dismissed by a user, if one exists.
|
getDesiredHeight
public int getDesiredHeight ()
Returns |
int |
the ideal height, in DPs, for the floating window that app content defined by
getIntent() for this bubble. A value of 0 indicates a desired height has not
been set.
|
getDesiredHeightResId
public int getDesiredHeightResId ()
Returns |
int |
the resId of ideal height for the floating window that app content defined by
getIntent() for this bubble. A value of 0 indicates a res value has not
been provided for the desired height.
|
getIcon
public IconCompat getIcon ()
Returns |
IconCompat |
the icon that will be displayed for this bubble when it is collapsed.
|
getIntent
public PendingIntent getIntent ()
Returns |
PendingIntent |
the pending intent used to populate the floating window for this bubble.
|
isNotificationSuppressed
public boolean isNotificationSuppressed ()
Returns |
boolean |
whether this bubble should suppress the notification when it is posted. |
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.