Class DefaultMediaDescriptionAdapter

  • All Implemented Interfaces:
    com.google.android.exoplayer2.ui.PlayerNotificationManager.MediaDescriptionAdapter

    public class DefaultMediaDescriptionAdapter
    extends java.lang.Object
    implements com.google.android.exoplayer2.ui.PlayerNotificationManager.MediaDescriptionAdapter
    The @{link MediaDescriptionAdapter} for the player notification displayed in the notification.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      android.app.PendingIntent createCurrentContentIntent​(com.google.android.exoplayer2.Player player)  
      java.lang.CharSequence getCurrentContentText​(com.google.android.exoplayer2.Player player)  
      java.lang.CharSequence getCurrentContentTitle​(com.google.android.exoplayer2.Player player)  
      android.graphics.Bitmap getCurrentLargeIcon​(com.google.android.exoplayer2.Player player, com.google.android.exoplayer2.ui.PlayerNotificationManager.BitmapCallback callback)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.google.android.exoplayer2.ui.PlayerNotificationManager.MediaDescriptionAdapter

        getCurrentSubText
    • Constructor Detail

      • DefaultMediaDescriptionAdapter

        public DefaultMediaDescriptionAdapter​(MediaPlayback<com.google.android.exoplayer2.ExoPlayer> playback)
        Construct a new adapter from the current media playback.
        Parameters:
        playback - The MediaPlayback with ExoPlayer as the Player.
    • Method Detail

      • getCurrentContentTitle

        public java.lang.CharSequence getCurrentContentTitle​(com.google.android.exoplayer2.Player player)
        Specified by:
        getCurrentContentTitle in interface com.google.android.exoplayer2.ui.PlayerNotificationManager.MediaDescriptionAdapter
      • getCurrentContentText

        @Nullable
        public java.lang.CharSequence getCurrentContentText​(com.google.android.exoplayer2.Player player)
        Specified by:
        getCurrentContentText in interface com.google.android.exoplayer2.ui.PlayerNotificationManager.MediaDescriptionAdapter
      • createCurrentContentIntent

        @Nullable
        public android.app.PendingIntent createCurrentContentIntent​(com.google.android.exoplayer2.Player player)
        Specified by:
        createCurrentContentIntent in interface com.google.android.exoplayer2.ui.PlayerNotificationManager.MediaDescriptionAdapter
      • getCurrentLargeIcon

        @Nullable
        public android.graphics.Bitmap getCurrentLargeIcon​(com.google.android.exoplayer2.Player player,
                                                           com.google.android.exoplayer2.ui.PlayerNotificationManager.BitmapCallback callback)
        Specified by:
        getCurrentLargeIcon in interface com.google.android.exoplayer2.ui.PlayerNotificationManager.MediaDescriptionAdapter