Interface AsyncScanController.IAsyncScanResultReceiver
- Enclosing class:
- AsyncScanController<T extends AntPluginPcc>
public static interface AsyncScanController.IAsyncScanResultReceiver
Receives results and failures of an async scan.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Returns every device found by the scan.void
onSearchStopped
(RequestAccessResult reasonStopped) Called when the async scan is stopped for any reason other than a successful access request, for example: an error starting the scan, an error running the scan, or a fatal error attempting to connect to a device.
-
Method Details
-
onSearchStopped
Called when the async scan is stopped for any reason other than a successful access request, for example: an error starting the scan, an error running the scan, or a fatal error attempting to connect to a device. When this is called the scan is closed and there is no need to close it yourself.- Parameters:
reasonStopped
- The reason the search stopped. Possible returns include:
-
onSearchResult
Returns every device found by the scan. Note: The current scan implementation runs continuously but resets roughly every 10s. Every time the scan resets there is the possibility to send devices that have already been sent previously. Your app should handle repeated devices by comparing device numbers usingAsyncScanController.AsyncScanResultDeviceInfo.getAntDeviceNumber()
- Parameters:
deviceFound
- The new device found by the scan.
-