-
public interface PlaybackNotification.MediaDescriptionAdapter
An adapter to provide content assets of the media currently playing.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
PlaybackNotification.MediaDescriptionAdapter.BitmapCallback
Callback invoked when the image is loaded and ready to display in the notification.
-
Method Summary
Modifier and Type Method Description CharSequence
getCurrentContentTitle(MediaPlayback<out Object> playback)
Gets the content title for the current media item. PendingIntent
createCurrentContentIntent(MediaPlayback<out Object> playback)
Creates a content intent for the current media item. CharSequence
getCurrentContentText(MediaPlayback<out Object> playback)
Gets the content text for the current media item. CharSequence
getCurrentSubText(MediaPlayback<out Object> playback)
Gets the content sub text for the current media item. Bitmap
getCurrentLargeIcon(MediaPlayback<out Object> playback, PlaybackNotification.MediaDescriptionAdapter.BitmapCallback callback)
Gets the large icon for the current media item. -
-
Method Detail
-
getCurrentContentTitle
CharSequence getCurrentContentTitle(MediaPlayback<out Object> playback)
Gets the content title for the current media item.
See setContentTitle.
- Parameters:
playback
- The link PlMediaPlayback} for which a notification is being built.
-
createCurrentContentIntent
@Nullable() PendingIntent createCurrentContentIntent(MediaPlayback<out Object> playback)
Creates a content intent for the current media item.
See setContentIntent.
- Parameters:
playback
- The link PlMediaPlayback} for which a notification is being built.
-
getCurrentContentText
@Nullable() CharSequence getCurrentContentText(MediaPlayback<out Object> playback)
Gets the content text for the current media item.
See setContentText.
- Parameters:
playback
- The link PlMediaPlayback} for which a notification is being built.
-
getCurrentSubText
@Nullable() CharSequence getCurrentSubText(MediaPlayback<out Object> playback)
Gets the content sub text for the current media item.
See setSubText.
- Parameters:
playback
- The link PlMediaPlayback} for which a notification is being built.
-
getCurrentLargeIcon
@Nullable() Bitmap getCurrentLargeIcon(MediaPlayback<out Object> playback, PlaybackNotification.MediaDescriptionAdapter.BitmapCallback callback)
Gets the large icon for the current media item.
When a bitmap needs to be loaded asynchronously, a placeholder bitmap (or null) should bereturned. The actual bitmap should be passed to the BitmapCallback once it has beenloaded. Because the adapter may be called multiple times for the same media item, bitmapsshould be cached by the app and returned synchronously when possible.
See setLargeIcon.
- Parameters:
playback
- The MediaPlayback for which a notification is being built.callback
- A BitmapCallback to provide a Bitmap asynchronously.
-
-
-
-