Interface PlaybackNotification.MediaDescriptionAdapter

  • Enclosing class:
    PlaybackNotification

    public static interface PlaybackNotification.MediaDescriptionAdapter
    An adapter to provide content assets of the media currently playing.
    • Method Detail

      • getCurrentContentTitle

        default java.lang.CharSequence getCurrentContentTitle​(MediaPlayback<?> playback)
        Gets the content title for the current media item.

        See Notification.Builder.setContentTitle(CharSequence).

        Parameters:
        playback - The link PlMediaPlayback} for which a notification is being built.
        Returns:
        The content title for the current media item.
      • createCurrentContentIntent

        @Nullable
        default android.app.PendingIntent createCurrentContentIntent​(MediaPlayback<?> playback)
        Creates a content intent for the current media item.

        See Notification.Builder.setContentIntent(PendingIntent).

        Parameters:
        playback - The link PlMediaPlayback} for which a notification is being built.
        Returns:
        The content intent for the current media item, or null if no intent should be fired.
      • getCurrentContentText

        @Nullable
        default java.lang.CharSequence getCurrentContentText​(MediaPlayback<?> playback)
        Gets the content text for the current media item.

        See Notification.Builder.setContentText(CharSequence).

        Parameters:
        playback - The link PlMediaPlayback} 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.
      • getCurrentSubText

        @Nullable
        default java.lang.CharSequence getCurrentSubText​(MediaPlayback<?> playback)
        Gets the content sub text for the current media item.

        See Notification.Builder.setSubText(CharSequence).

        Parameters:
        playback - The link PlMediaPlayback} for which a notification is being built.
        Returns:
        The content subtext for the current media item, or null if no subtext should be displayed.