docs/doc/reference/com/google/android/exoplayer2/ui/DefaultMediaDescriptionAdapter.html
Package com.google.android.exoplayer2.ui
All Implemented Interfaces:PlayerNotificationManager.MediaDescriptionAdapter
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classDefaultMediaDescriptionAdapterextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[PlayerNotificationManager.MediaDescriptionAdapter](PlayerNotificationManager.MediaDescriptionAdapter.html "interface in com.google.android.exoplayer2.ui")
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.
Default implementation of PlayerNotificationManager.MediaDescriptionAdapter.
Uses values from the player mediaMetadata to populate the notification.
Constructors | Constructor | Description |
| --- | --- |
| DefaultMediaDescriptionAdapter(PendingIntent pendingIntent) |
Deprecated.
Creates a default PlayerNotificationManager.MediaDescriptionAdapter.
|
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| PendingIntent | createCurrentContentIntent(Player player) |
Deprecated.
Creates a content intent for the current media item.
|
| CharSequence | getCurrentContentText(Player player) |
Deprecated.
Gets the content text for the current media item.
|
| CharSequence | getCurrentContentTitle(Player player) |
Deprecated.
Gets the content title for the current media item.
|
| Bitmap | getCurrentLargeIcon(Player player, PlayerNotificationManager.BitmapCallback callback) |
Deprecated.
Gets the large icon for the current media item. |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
getCurrentSubText
-
public DefaultMediaDescriptionAdapter(@Nullable[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html "class or interface in android.app")pendingIntent)
Deprecated.
Creates a default PlayerNotificationManager.MediaDescriptionAdapter.
Parameters:pendingIntent - The PendingIntent to be returned from createCurrentContentIntent(Player), or null if no intent should be fired.
-
public[CharSequence](https://developer.android.com/reference/java/lang/CharSequence.html "class or interface in java.lang")getCurrentContentTitle([Player](../Player.html "interface in com.google.android.exoplayer2")player)
Deprecated.
Description copied from interface: PlayerNotificationManager.MediaDescriptionAdapter
Gets the content title for the current media item.
See NotificationCompat.Builder.setContentTitle(CharSequence).
Specified by:getCurrentContentTitle in interface PlayerNotificationManager.MediaDescriptionAdapterParameters:player - The Player for which a notification is being built.Returns:The content title for the current media item.
-
@Nullable
public[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html "class or interface in android.app")createCurrentContentIntent([Player](../Player.html "interface in com.google.android.exoplayer2")player)
Deprecated.
Description copied from interface: PlayerNotificationManager.MediaDescriptionAdapter
Creates a content intent for the current media item.
See NotificationCompat.Builder.setContentIntent(PendingIntent).
Specified by:createCurrentContentIntent in interface PlayerNotificationManager.MediaDescriptionAdapterParameters:player - The Player for which a notification is being built.Returns:The content intent for the current media item, or null if no intent should be fired.
-
@Nullable
public[CharSequence](https://developer.android.com/reference/java/lang/CharSequence.html "class or interface in java.lang")getCurrentContentText([Player](../Player.html "interface in com.google.android.exoplayer2")player)
Deprecated.
Description copied from interface: PlayerNotificationManager.MediaDescriptionAdapter
Gets the content text for the current media item.
See NotificationCompat.Builder.setContentText(CharSequence).
Specified by:getCurrentContentText in interface PlayerNotificationManager.MediaDescriptionAdapterParameters:player - The Player for which a notification is being built.Returns:The content text for the current media item, or null if no context text should be displayed.
-
@Nullable
public[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html "class or interface in android.graphics")getCurrentLargeIcon([Player](../Player.html "interface in com.google.android.exoplayer2")player,[PlayerNotificationManager.BitmapCallback](PlayerNotificationManager.BitmapCallback.html "class in com.google.android.exoplayer2.ui")callback)
Deprecated.
Description copied from interface: PlayerNotificationManager.MediaDescriptionAdapter
Gets the large icon for the current media item.
When a bitmap needs to be loaded asynchronously, a placeholder bitmap (or null) should be returned. The actual bitmap should be passed to the PlayerNotificationManager.BitmapCallback once it has been loaded. Because the adapter may be called multiple times for the same media item, bitmaps should be cached by the app and returned synchronously when possible.
See NotificationCompat.Builder.setLargeIcon(Bitmap).
Specified by:getCurrentLargeIcon in interface PlayerNotificationManager.MediaDescriptionAdapterParameters:player - The Player for which a notification is being built.callback - A PlayerNotificationManager.BitmapCallback to provide a Bitmap asynchronously.Returns:The large icon for the current media item, or null if the icon will be returned through the PlayerNotificationManager.BitmapCallback or if no icon should be displayed.