# OnDeviceFoundListener

interface OnDeviceFoundListener

Interface definition for a callback to be invoked when an IDeviceScanner has discovered a supported Nix device.

## Functions

onScanFailed
Link copied to clipboard
open fun onScanFailed(sender: IDeviceScanner, errorCode: Int)

Called when an IDeviceScanner has encountered an error (optional)

onScanResult
Link copied to clipboard
abstract fun onScanResult(sender: IDeviceScanner, device: IDeviceCompat)

Called when an IDeviceScanner has found a Nix device. This is invoked each time that a device advertisement has been received, or signal strength (IDeviceCompat.rssi) has updated, so multiple events may be received for a given Nix device. The IDeviceCompat.id can be used to uniquely identify each separate device.