MediaLibraryService.LibraryParams


class MediaLibraryService.LibraryParams : Bundleable


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.

Constants

const Bundleable.Creator<MediaLibraryService.LibraryParams!>!

This property is deprecated.

Use fromBundle instead.

Public functions

java-static MediaLibraryService.LibraryParams!

Restores a LibraryParams from a Bundle.

Bundle!

Returns a Bundle representing the information stored in this object.

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.

Constants

CREATOR

@UnstableApi
const val CREATORBundleable.Creator<MediaLibraryService.LibraryParams!>!

Object that can restore LibraryParams from a Bundle.

Public functions

fromBundle

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

Restores a LibraryParams from a Bundle.

toBundle

@UnstableApi
fun toBundle(): Bundle!

Returns a Bundle representing the information stored in this object.

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.