SourceInfo

data class SourceInfo(    val id: SourceId,     val displayName: String,     val icon: Icon,     val isReady: Boolean,     val loginIntent: PendingIntent? = null) : Parcelable

Information about a media source.

SourceInfo objects are compared by all their fields, except icon. The icon has to be ignored, since Icons, and in general Drawables, are not easily comparable. The only way to properly compare icons is pixel by pixel, and it is seemingly still error-prone, and very resource-intensive; not discounting the fact that it's not useful to compare SourceInfo instances (their id would be enough).

Parameters

id

Unique SourceId of this source.

displayName

Source name to display in the user interface. Possibly not unique.

icon

Icon to visually represent the source in the user interface.

isReady

Whether the media source is ready to browse and play content. When this flag is false, browsing the source content will fail or will return no content.

loginIntent

Android PendingIntent to perform if the source needs a login. This field will be null when a login is not currently necessary, or when a login is not supported at all.

Constructors

Link copied to clipboard
fun SourceInfo(    id: SourceId,     displayName: String,     icon: Icon,     isReady: Boolean,     loginIntent: PendingIntent? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val displayName: String
Link copied to clipboard
val icon: Icon
Link copied to clipboard
val id: SourceId
Link copied to clipboard
val isReady: Boolean
Link copied to clipboard
val loginIntent: PendingIntent? = null

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String

Inherited functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)