GoogleCastDiscoveryManagerPlatformInterface class abstract

A class that manages the device discovery process.

GCKDiscoveryManager manages a collection of GCKDeviceProvider subclass instances, each of which is responsible for discovering devices of a specific type. It also maintains a lexicographically ordered list of the currently discovered devices.

The framework automatically starts the discovery process when the application moves to the foreground and suspends it when the application moves to the background. It is generally not necessary for the application to call startDiscovery (GCKDiscoveryManager) and stopDiscovery (GCKDiscoveryManager), except as an optimization measure to reduce network traffic and CPU utilization in areas of the application that do not use Cast functionality.

If the application is using the framework's Cast dialog, either by way of GCKUICastButton or by presenting it directly, then that dialog will use GCKDiscoveryManager to populate its list of available devices. If however the application is providing its own device selection/control dialog UI, then it should use the GCKDiscoveryManager and its associated listener protocol, GCKDiscoveryManagerListener, to populate and update its list of available devices.

Since
3.0
Implementers

Properties

devices List<GoogleCastDevice>
Returns the list of currently discovered devices.
no setter
devicesStream Stream<List<GoogleCastDevice>>
Returns a stream of the currently discovered devices.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

isDiscoveryActiveForDeviceCategory(String deviceCategory) Future<bool>
Tests whether discovery is currently active for the given device category.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startDiscovery() Future<void>
Starts the discovery process. strongly recommended to call this method when the application is show cast devices dialog because the battery consumption is high when the discovery process is running.
stopDiscovery() Future<void>
Stops the discovery process. strongly recommended to call this method when the application close the show cast devices dialog for reduce battery consumption.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited