MediaLibraryService.LibraryParams


class MediaLibraryService.LibraryParams


Parameters for the interaction between MediaBrowser and MediaLibrarySession.

When a MediaBrowser specifies the parameters, the MediaLibrarySession is recommended to do the best effort to provide a result regarding the parameters, but it's not an error even though MediaLibrarySession doesn't return the parameters since they are optional.

Summary

Nested types

A builder for LibraryParams.

Public functions

java-static MediaLibraryService.LibraryParams!

Restores a LibraryParams from a Bundle.

Bundle!

Public properties

Bundle!

An extra Bundle for the private contract between MediaBrowser and .

Boolean

Whether the media items can be played without an internet connection.

Boolean

Whether the media items are recently played.

Boolean

Whether the media items are suggested.

Public functions

fromBundle

@UnstableApi
java-static fun fromBundle(bundle: Bundle!): MediaLibraryService.LibraryParams!

Restores a LibraryParams from a Bundle.

toBundle

@UnstableApi
fun toBundle(): Bundle!

Public properties

extras

@UnstableApi
val extrasBundle!

An extra Bundle for the private contract between MediaBrowser and .

isOffline

val isOfflineBoolean

Whether the media items can be played without an internet connection.

When a MediaBrowser specifies it as true, the MediaLibrarySession is recommended to provide offline media items. If so, the implementation must return the parameter with true as well.

When a MediaBrowser specifies it as false, the MediaLibrarySession doesn't have to care about the offline playability of media items.

isRecent

val isRecentBoolean

Whether the media items are recently played.

When a MediaBrowser specifies it as true, the MediaLibrarySession is recommended to provide the recently played media items. If so, the implementation must return the parameter with true as well. The list of media items is sorted by relevance, the first being the most recent.

When a MediaBrowser specifies it as false, the MediaLibrarySession doesn't have to care about the recentness of media items.

isSuggested

val isSuggestedBoolean

Whether the media items are suggested.

When a MediaBrowser specifies it as true, the MediaLibrarySession is recommended to provide suggested media items. If so, the implementation must return the parameter with true as well. The list of media items is sorted by relevance, the first being the top suggestion.

When a MediaBrowser specifies it as false, the MediaLibrarySession doesn't have to care about the suggestion for media items.