SourceClient

interface SourceClient

A client to browse content offered by a media source.

Browsing to an IviMediaItem, instructs the client to make the list of IviMediaItems inside of that item available in contents.

If the specified media source crashes, the source client invokes an ErrorCallback for special handling.

The connection state is held by isAvailable. After the connection is closed, the client can not be reused, as this condition is usually not recoverable.

See also

Properties

Link copied to clipboard
abstract val contents: LiveData<List<IviMediaItem>>

The list of IviMediaItems available for browsing.

Link copied to clipboard
abstract val isAvailable: LiveData<Boolean>

Whether the source can be queried and provide content.

Link copied to clipboard
abstract val isLoading: LiveData<Boolean>

Whether the source is loading content.

Link copied to clipboard
abstract val rootMetadata: LiveData<Bundle?>

The client root extras. Can be used to store various values to determine source behavior.

Functions

Link copied to clipboard
abstract fun setContext(context: Context?)

Attaches the client to an Android Context.

Link copied to clipboard
abstract fun setErrorCallback(callback: ErrorCallback)

Set the callback where to receive notifications about error conditions.

Link copied to clipboard
abstract fun setTag(tag: String)

Set a tag to identify this client in debugging logs.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard