Notification.BubbleMetadata
public
static
final
class
Notification.BubbleMetadata
extends Object
implements
Parcelable
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,
Notification.BubbleMetadata.Builder.setIcon(Icon) and an expanded state which is populated
via Notification.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 |
Notification.BubbleMetadata.Builder
Builder to construct a BubbleMetadata object.
|
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object.
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
|
|
|
Fields
Public methods
describeContents
public int describeContents ()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of writeToParcel(android.os.Parcel, int),
the return value of this method must include the
CONTENTS_FILE_DESCRIPTOR bit.
| Returns |
int |
a bitmask indicating the set of special object types marshaled
by this Parcelable object instance.
Value is either 0 or CONTENTS_FILE_DESCRIPTOR |
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 for the floating window that app content defined by
getIntent() for this bubble. |
getIcon
public Icon getIcon ()
| Returns |
Icon |
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. |
getSuppressInitialNotification
public boolean getSuppressInitialNotification ()
| Returns |
boolean |
whether this bubble should suppress the initial notification when it is posted. |
getTitle
public CharSequence getTitle ()
This method was deprecated
in API level Q.
titles are no longer required or shown.
writeToParcel
public void writeToParcel (Parcel out,
int flags)
Flatten this object in to a Parcel.
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.