MediaLibraryService.LibraryParams.Builder

Added in 1.0.0
Deprecated in 1.3.0

class MediaLibraryService.LibraryParams.Builder


Builds a LibraryParams.

Summary

Public constructors

Public functions

MediaLibraryService.LibraryParams

Builds a LibraryParams.

MediaLibraryService.LibraryParams.Builder
setExtras(extras: Bundle?)

Set a bundle of extras, that browser and library session can understand each other.

MediaLibraryService.LibraryParams.Builder
setOffline(offline: Boolean)

Sets whether offline media items, which can be played without an internet connection.

MediaLibraryService.LibraryParams.Builder
setRecent(recent: Boolean)

Sets whether recently played media item.

MediaLibraryService.LibraryParams.Builder
setSuggested(suggested: Boolean)

Sets whether suggested media items.

Public constructors

Builder

Added in 1.0.0
Deprecated in 1.3.0
Builder()

Public functions

build

Added in 1.0.0
Deprecated in 1.3.0
fun build(): MediaLibraryService.LibraryParams

Builds a LibraryParams.

Returns
MediaLibraryService.LibraryParams

new LibraryParams

setExtras

Added in 1.0.0
Deprecated in 1.3.0
fun setExtras(extras: Bundle?): MediaLibraryService.LibraryParams.Builder

Set a bundle of extras, that browser and library session can understand each other.

Parameters
extras: Bundle?

The extras or null.

setOffline

Added in 1.0.0
Deprecated in 1.3.0
fun setOffline(offline: Boolean): MediaLibraryService.LibraryParams.Builder

Sets whether offline media items, which can be played without an internet connection.

When the browser supplies LibraryParams with the true, library session is recommended to provide such media items. If so, the library session implementation must return the params with the true as well.

Parameters
offline: Boolean

true for offline items. false otherwise.

setRecent

Added in 1.0.0
Deprecated in 1.3.0
fun setRecent(recent: Boolean): MediaLibraryService.LibraryParams.Builder

Sets whether recently played media item.

When the browser supplies the LibraryParams with the true, library session is recommended to provide such media items. If so, the library session implementation must return the params with the true as well.

Parameters
recent: Boolean

true for recent items. false otherwise.

setSuggested

Added in 1.0.0
Deprecated in 1.3.0
fun setSuggested(suggested: Boolean): MediaLibraryService.LibraryParams.Builder

Sets whether suggested media items.

When the browser supplies LibraryParams with the true, library session is recommended to provide such media items. If so, the library session implementation must return the params with the true as well. The list of media items is considered ordered by relevance, first being the top suggestion.

Parameters
suggested: Boolean

true for suggested items. false otherwise