public static final class MediaLibraryService.LibraryParams
extends Object implements VersionedParcelable

   ↳ androidx.media2.session.MediaLibraryService.LibraryParams

Contains information that the library service needs to send to the client.

When the browser supplies MediaLibraryService.LibraryParams, it's optional field when getting the media item(s). The library session is recommended to do the best effort to provide such result. It's not an error even when the library session didn't return such items.

The library params returned in the library session callback must include the information about the returned media item(s).


Nested classes

class MediaLibraryService.LibraryParams.Builder

Builds a MediaLibraryService.LibraryParams

Public methods

Bundle getExtras()

Gets the extras.

boolean isOffline()

Returns true for offline media items, which can be played without an internet connection.

boolean isRecent()

Returns true for recent media items.

boolean isSuggested()

Returns true for suggested media items.

Inherited methods

Public methods


public Bundle getExtras ()

Gets the extras.

Extras are the private contract between browser and library session.