MediaRouteDiscoveryRequest

public final class MediaRouteDiscoveryRequest
extends Object

java.lang.Object
   ↳ androidx.mediarouter.media.MediaRouteDiscoveryRequest


Describes the kinds of routes that the media router would like to discover and whether to perform active scanning.

This object is immutable once created.

Summary

Public constructors

MediaRouteDiscoveryRequest(MediaRouteSelector selector, boolean activeScan)

Creates a media route discovery request.

Public methods

Bundle asBundle()

Converts this object to a bundle for serialization.

boolean equals(Object o)
static MediaRouteDiscoveryRequest fromBundle(Bundle bundle)

Creates an instance from a bundle.

MediaRouteSelector getSelector()

Gets the route selector that specifies the kinds of routes to discover.

int hashCode()
boolean isActiveScan()

Returns true if active scanning should be performed.

boolean isValid()

Returns true if the discovery request has all of the required fields.

String toString()

Inherited methods

Public constructors

MediaRouteDiscoveryRequest

public MediaRouteDiscoveryRequest (MediaRouteSelector selector, 
                boolean activeScan)

Creates a media route discovery request.

Parameters
selector MediaRouteSelector: The route selector that specifies the kinds of routes to discover.

activeScan boolean: True if active scanning should be performed.

Public methods

asBundle

public Bundle asBundle ()

Converts this object to a bundle for serialization.

Returns
Bundle The contents of the object represented as a bundle.

equals

public boolean equals (Object o)

Parameters
o Object

Returns
boolean

fromBundle

public static MediaRouteDiscoveryRequest fromBundle (Bundle bundle)

Creates an instance from a bundle.

Parameters
bundle Bundle: The bundle, or null if none.

Returns
MediaRouteDiscoveryRequest The new instance, or null if the bundle was null.

getSelector

public MediaRouteSelector getSelector ()

Gets the route selector that specifies the kinds of routes to discover.

Returns
MediaRouteSelector

hashCode

public int hashCode ()

Returns
int

isActiveScan

public boolean isActiveScan ()

Returns true if active scanning should be performed.

Returns
boolean

isValid

public boolean isValid ()

Returns true if the discovery request has all of the required fields.

Returns
boolean

toString

public String toString ()

Returns
String