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(Creates a media route discovery request. |
Public methods |
|
|---|---|
@NonNull Bundle |
asBundle()Converts this object to a bundle for serialization. |
boolean |
|
static @Nullable MediaRouteDiscoveryRequest |
fromBundle(@Nullable Bundle bundle)Creates an instance from a bundle. |
@NonNull MediaRouteSelector |
Gets the route selector that specifies the kinds of routes to discover. |
int |
hashCode() |
boolean |
Returns true if active scanning should be performed. |
boolean |
isValid()Returns true if the discovery request has all of the required fields. |
@NonNull String |
toString() |
Public constructors
MediaRouteDiscoveryRequest
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
public @NonNull Bundle asBundle()
Converts this object to a bundle for serialization.
fromBundle
public static @Nullable MediaRouteDiscoveryRequest fromBundle(@Nullable Bundle bundle)
Creates an instance from a bundle.
| Returns | |
|---|---|
@Nullable MediaRouteDiscoveryRequest |
The new instance, or null if the bundle was null. |
getSelector
public @NonNull MediaRouteSelector getSelector()
Gets the route selector that specifies the kinds of routes to discover.
isActiveScan
public boolean isActiveScan()
Returns true if active scanning should be performed.
| See also | |
|---|---|
CALLBACK_FLAG_PERFORM_ACTIVE_SCAN |