public static interface PlayerNotificationManager.MediaDescriptionAdapter
| Modifier and Type | Method and Description |
|---|---|
android.app.PendingIntent |
createCurrentContentIntent(com.google.android.exoplayer2.Player player)
Creates a content intent for the current media item.
|
java.lang.String |
getCurrentContentText(com.google.android.exoplayer2.Player player)
Gets the content text for the current media item.
|
java.lang.String |
getCurrentContentTitle(com.google.android.exoplayer2.Player player)
Gets the content title for the current media item.
|
android.graphics.Bitmap |
getCurrentLargeIcon(com.google.android.exoplayer2.Player player,
PlayerNotificationManager.BitmapCallback callback)
Gets the large icon for the current media item.
|
java.lang.String getCurrentContentTitle(com.google.android.exoplayer2.Player player)
See NotificationCompat.Builder#setContentTitle(CharSequence).
player - The Player for which a notification is being built.@Nullable android.app.PendingIntent createCurrentContentIntent(com.google.android.exoplayer2.Player player)
See NotificationCompat.Builder#setContentIntent(PendingIntent).
player - The Player for which a notification is being built.@Nullable java.lang.String getCurrentContentText(com.google.android.exoplayer2.Player player)
See NotificationCompat.Builder#setContentText(CharSequence).
player - The Player for which a notification is being built.@Nullable
android.graphics.Bitmap getCurrentLargeIcon(com.google.android.exoplayer2.Player player,
PlayerNotificationManager.BitmapCallback callback)
When a bitmap initially needs to be asynchronously loaded, a placeholder (or null) can be
returned and the bitmap asynchronously passed to the PlayerNotificationManager.BitmapCallback once it is
loaded. Because the adapter may be called multiple times for the same media item, the bitmap
should be cached by the app and whenever possible be returned synchronously at subsequent
calls for the same media item.
See NotificationCompat.Builder#setLargeIcon(Bitmap).
player - The Player for which a notification is being built.callback - A PlayerNotificationManager.BitmapCallback to provide a Bitmap asynchronously.