public static interface PlayerNotificationManager.MediaDescriptionAdapter
| Modifier and Type | Method | Description |
|---|---|---|
PendingIntent |
createCurrentContentIntent(Player player) |
Creates a content intent for the current media item.
|
CharSequence |
getCurrentContentText(Player player) |
Gets the content text for the current media item.
|
CharSequence |
getCurrentContentTitle(Player player) |
Gets the content title for the current media item.
|
Bitmap |
getCurrentLargeIcon(Player player,
PlayerNotificationManager.BitmapCallback callback) |
Gets the large icon for the current media item.
|
default CharSequence |
getCurrentSubText(Player player) |
Gets the content sub text for the current media item.
|
CharSequence getCurrentContentTitle(Player player)
See NotificationCompat.Builder.setContentTitle(CharSequence).
player - The Player for which a notification is being built.@Nullable PendingIntent createCurrentContentIntent(Player player)
See NotificationCompat.Builder.setContentIntent(PendingIntent).
player - The Player for which a notification is being built.@Nullable CharSequence getCurrentContentText(Player player)
See NotificationCompat.Builder.setContentText(CharSequence).
player - The Player for which a notification is being built.@Nullable default CharSequence getCurrentSubText(Player player)
See NotificationCompat.Builder.setSubText(CharSequence).
player - The Player for which a notification is being built.@Nullable Bitmap getCurrentLargeIcon(Player player, PlayerNotificationManager.BitmapCallback callback)
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).
player - The Player for which a notification is being built.callback - A PlayerNotificationManager.BitmapCallback to provide a Bitmap asynchronously.