# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Nested Classes | Inherited Constants | Fields | Methods | Inherited Methods

# Notification.BubbleMetadata

`public static final class Notification.BubbleMetadata`
`extends Object` `implements Parcelable`

java.lang.Object
↳ | android.app.Notification.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 and an expanded state that displays an activity. These may be defined via `Builder#Builder(PendingIntent, Icon)` or they may be defined via an existing shortcut using `Builder#Builder(String)`.

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 activity will be invoked and displayed.

See also:

- `Notification.Builder.setBubbleMetadata(BubbleMetadata)`

## Summary

### Nested classes
`class` | `Notification.BubbleMetadata.Builder` Builder to construct a `BubbleMetadata` object.

### Inherited constants
From interface `android.os.Parcelable`
`int` | `CONTENTS_FILE_DESCRIPTOR` Descriptor bit used with `describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.
`int` | `PARCELABLE_WRITE_RETURN_VALUE` Flag for use with `writeToParcel(Parcel, int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`".

### Fields
`public static final Creator<Notification.BubbleMetadata>` | `CREATOR`

### Public methods
`int` | `describeContents()` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
`boolean` | `getAutoExpandBubble()`
`PendingIntent` | `getDeleteIntent()`
`int` | `getDesiredHeight()`
`int` | `getDesiredHeightResId()`
`Icon` | `getIcon()`
`PendingIntent` | `getIntent()`
`String` | `getShortcutId()`
`boolean` | `isNotificationSuppressed()` Indicates whether the notification associated with the bubble is being visually suppressed from the notification shade.
`void` | `writeToParcel(Parcel out, int flags)` Flatten this object in to a Parcel.

### 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.
From interface `android.os.Parcelable`
`abstract int` | `describeContents()` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
`abstract void` | `writeToParcel(Parcel dest, int flags)` Flatten this object in to a Parcel.

## Fields

### CREATOR

    public static final Creator<Notification.BubbleMetadata> CREATOR

## 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.

See also:

- `Notification.BubbleMetadata.Builder.setAutoExpandBubble(boolean)`

### getDeleteIntent

    public PendingIntent getDeleteIntent ()

Returns
`PendingIntent` | the pending intent to send when the bubble is dismissed by a user, if one exists. This value may be `null`.

### 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 Icon getIcon ()

Returns
`Icon` | the icon that will be displayed for this bubble when it is collapsed, or null if the bubble is created via `Builder#Builder(String)`.

### getIntent

    public PendingIntent getIntent ()

Returns
`PendingIntent` | the pending intent used to populate the floating window for this bubble, or null if this bubble is created via `Builder#Builder(String)`.

### getShortcutId

    public String getShortcutId ()

Returns
`String` | the shortcut id used for this bubble if created via `Builder#Builder(String)` or null if created via `Builder#Builder(PendingIntent, Icon)`.

### isNotificationSuppressed

    public boolean isNotificationSuppressed ()

Indicates whether the notification associated with the bubble is being visually suppressed from the notification shade. When `true` the notification is hidden, when `false` the notification shows as normal.

Apps sending bubbles may set this flag so that the bubble is posted without the associated notification in the notification shade.

Apps sending bubbles can only apply this flag when the app is in the foreground, otherwise the flag is not respected. The app is considered foreground if it is visible and on the screen, note that a foreground service does not qualify.

Generally the app should only set this flag if the user has performed an action to request or create a bubble, or if the user has seen the content in the notification and the notification is no longer relevant.

The system will update this flag with `true` to hide the notification from the user once the bubble has been expanded.

Returns
`boolean` | whether this bubble should suppress the notification when it is posted.

See also:

- `Notification.BubbleMetadata.Builder.setSuppressNotification(boolean)`

### writeToParcel

    public void writeToParcel (Parcel out,
                    int flags)

Flatten this object in to a Parcel.

Parameters
`out` | `Parcel`: The Parcel in which the object should be written.
`flags` | `int`: Additional flags about how the object should be written. May be 0 or `Parcelable.PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of `Parcelable.PARCELABLE_WRITE_RETURN_VALUE`, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*