RouteDiscoveryPreference
class RouteDiscoveryPreference : Parcelable
kotlin.Any | |
↳ | android.media.RouteDiscoveryPreference |
A media route discovery preference describing the features of routes that media router would like to discover and whether to perform active scanning.
When MediaRouter2
instances set discovery preferences by calling MediaRouter2#registerRouteCallback
, they are merged into a single discovery preference and it is delivered to call MediaRoute2ProviderService#onDiscoveryPreferenceChanged
.
According to the given discovery preference, MediaRoute2ProviderService
discovers routes and publishes them.
Summary
Nested classes | |
---|---|
Builder for |
Inherited constants | |
---|---|
Public methods | |
---|---|
Int | |
Boolean | |
MutableList<String!> |
Gets the features of routes that media router would like to discover. |
Int |
hashCode() |
Boolean |
Gets whether active scanning should be performed. |
String |
toString() |
Unit |
writeToParcel(dest: Parcel, flags: Int) Flatten this object in to a Parcel. |
Properties | |
---|---|
static Parcelable.Creator<RouteDiscoveryPreference!> |
Public methods
describeContents
fun describeContents(): Int
Return | |
---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
equals
fun equals(other: Any?): Boolean
Parameters | |
---|---|
obj |
the reference object with which to compare. |
Return | |
---|---|
Boolean |
true if this object is the same as the obj argument; false otherwise. |
getPreferredFeatures
fun getPreferredFeatures(): MutableList<String!>
Gets the features of routes that media router would like to discover.
Routes that have at least one of the features will be discovered. They may include predefined features such as MediaRoute2Info#FEATURE_LIVE_AUDIO
, MediaRoute2Info#FEATURE_LIVE_VIDEO
, or MediaRoute2Info#FEATURE_REMOTE_PLAYBACK
or custom features defined by a provider.
Return | |
---|---|
MutableList<String!> |
This value cannot be null . |
shouldPerformActiveScan
fun shouldPerformActiveScan(): Boolean
Gets whether active scanning should be performed.
If any of discovery preferences sets this as true
, active scanning will be performed regardless of other discovery preferences.
toString
fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
Parameters | |
---|---|
dest |
Parcel: This value cannot be null . |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE . Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |