Added in API level 30

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 RouteDiscoveryPreference.

Inherited constants
Public methods
Int

Boolean
equals(other: Any?)

MutableList<String!>

Gets the features of routes that media router would like to discover.

Int

Boolean

Gets whether active scanning should be performed.

String

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<RouteDiscoveryPreference!>

Public methods

describeContents

Added in API level 30
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

Added in API level 30
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

Added in API level 30
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.

hashCode

Added in API level 30
fun hashCode(): Int
Return
Int a hash code value for this object.

shouldPerformActiveScan

Added in API level 30
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

Added in API level 30
fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 30
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

Properties

CREATOR

Added in API level 30
static val CREATOR: Parcelable.Creator<RouteDiscoveryPreference!>