MediaRouteDiscoveryRequest


public final class 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(
    @NonNull MediaRouteSelector selector,
    boolean activeScan
)

Creates a media route discovery request.

Public methods

@NonNull Bundle

Converts this object to a bundle for serialization.

boolean
static @Nullable MediaRouteDiscoveryRequest

Creates an instance from a bundle.

@NonNull MediaRouteSelector

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

int
boolean

Returns true if active scanning should be performed.

boolean

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

@NonNull String

Public constructors

MediaRouteDiscoveryRequest

Added in 1.1.0
public MediaRouteDiscoveryRequest(
    @NonNull MediaRouteSelector selector,
    boolean activeScan
)

Creates a media route discovery request.

Parameters
@NonNull MediaRouteSelector selector

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

boolean activeScan

True if active scanning should be performed.

Public methods

asBundle

Added in 1.1.0
public @NonNull Bundle asBundle()

Converts this object to a bundle for serialization.

Returns
@NonNull Bundle

The contents of the object represented as a bundle.

equals

public boolean equals(Object o)

fromBundle

Added in 1.1.0
public static @Nullable MediaRouteDiscoveryRequest fromBundle(@Nullable Bundle bundle)

Creates an instance from a bundle.

Parameters
@Nullable Bundle bundle

The bundle, or null if none.

Returns
@Nullable MediaRouteDiscoveryRequest

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

getSelector

Added in 1.1.0
public @NonNull MediaRouteSelector getSelector()

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

hashCode

public int hashCode()

isActiveScan

Added in 1.1.0
public boolean isActiveScan()

Returns true if active scanning should be performed.

isValid

Added in 1.1.0
public boolean isValid()

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

toString

public @NonNull String toString()