Back to Exoplayer

Bundleable (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/Bundleable.html

latest3.6 KB
Original Source

Package com.google.android.exoplayer2

Interface Bundleable

  • All Known Implementing Classes:AbstractConcatenatedTimeline, AdPlaybackState, AdPlaybackState.AdGroup, AudioAttributes, ColorInfo, Cue, CueGroup, DefaultTrackSelector.Parameters, DefaultTrackSelector.SelectionOverride, DeviceInfo, ExoPlaybackException, FakeMediaSource.InitialTimeline, FakeMultiPeriodLiveTimeline, FakeTimeline, Format, ForwardingTimeline, HeartRating, ImaServerSideAdInsertionMediaSource.AdsLoader.State, MaskingMediaSource.PlaceholderTimeline, MediaItem, MediaItem.AdsConfiguration, MediaItem.ClippingConfiguration, MediaItem.ClippingProperties, MediaItem.DrmConfiguration, MediaItem.LiveConfiguration, MediaItem.LocalConfiguration, MediaItem.RequestMetadata, MediaItem.Subtitle, MediaItem.SubtitleConfiguration, MediaMetadata, PercentageRating, PlaybackException, PlaybackParameters, Player.Commands, Player.PositionInfo, Rating, SinglePeriodAdTimeline, SinglePeriodTimeline, StarRating, StreamKey, ThumbRating, Timeline, Timeline.Period, Timeline.RemotableTimeline, Timeline.Window, TrackGroup, TrackGroupArray, Tracks, Tracks.Group, TrackSelectionOverride, TrackSelectionParameters, VideoSize

[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public interfaceBundleable

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

Interface for classes whose instance can be stored in a Bundle by toBundle() and can be restored from the Bundle by using the static CREATOR field that implements Bundleable.Creator.

For example, a Bundleable class Foo supports the following:

Foo foo = ...;
 Bundle fooBundle = foo.toBundle();
 Foo restoredFoo = Foo.CREATOR.fromBundle(fooBundle);
 assertThat(restoredFoo).isEqualTo(foo);

Nested Class Summary

Nested Classes | Modifier and Type | Interface | Description | | --- | --- | --- | | static interface | Bundleable.Creator<T extends Bundleable> | Deprecated.

Interface for the static CREATOR field of Bundleable classes. |

Method Summary

All Methods Instance Methods Abstract Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | Bundle | toBundle() | Deprecated.

Returns a Bundle representing the information stored in this object. |

Method Detail

- 

toBundle

[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")toBundle()

Deprecated.

Returns a Bundle representing the information stored in this object.