A class that (asynchronously) scans for available devices and sends corresponding notifications to its listener(s).
This class is implicitly a singleton; since it does a network scan, it isn't useful to have more than one instance of it in use. All methods and properties of this class may only be accessed from the main thread.
|("Use initWithFilterCriteria, |
do not use without a criteria")
|Constructs a new GCKDeviceScanner. More...|
|Designated initializer. More...|
|Starts a new device scan. More...|
|Stops any in-progress device scan. More...|
|Adds a listener for receiving notifications. More...|
|Removes a listener that was previously added with addListener:. More...|
|The array of discovered devices. More...|
|Whether the current/latest scan has discovered any devices. More...|
|Whether a scan is currently in progress. More...|
|The current filtering criteria. More...|
|Whether the scan should be a passive scan. More...|
|- ("Use initWithFilterCriteria, do not use without a criteria") GCK_DEPRECATED|
Constructs a new GCKDeviceScanner.
|- (instancetype) initWithFilterCriteria:||(GCKFilterCriteria *)||filterCriteria|
Constructs a new GCKDeviceScanner with the given filter criteria.
filterCriteria The filter criteria. May not be
|- (void) startScan|
Starts a new device scan.
The scan must eventually be stopped by calling stopScan.
|- (void) stopScan|
Stops any in-progress device scan.
This method must be called at some point after startScan was called and before this object is released by its owner.
|- (void) addListener:||(id< GCKDeviceScannerListener >)||listener|
Adds a listener for receiving notifications.
listener The listener to add.
|- (void) removeListener:||(id< GCKDeviceScannerListener >)||listener|
Removes a listener that was previously added with addListener:.
listener The listener to remove.
The array of discovered devices.
Whether the current/latest scan has discovered any devices.
Whether a scan is currently in progress.
The current filtering criteria.
Whether the scan should be a passive scan.
A passive scan sends discovery queries less frequently, so it is more efficient, but the results will not be as fresh. It's appropriate to do a passive scan when the user is not actively selecting a Cast target.
Google Cast iOS Sender API Reference v 2.10.1 4691