public interface ScanCallbacks
ScanCallbacks
interface provides callbacks related to scanning.
When starting to scan
, the application should give the scan callbacks in order
to be notified of the events related to the scan.
Modifier and Type | Method and Description |
---|---|
void |
onScanCompleted(BluetoothAdapter adapter)
Called when an ongoing scan is completed.
|
void |
onScanResult(BluetoothAdapter adapter,
BluetoothDevice device,
byte[] payload,
int rssi)
Called when a advertisement or a scan response is received.
|
void onScanResult(BluetoothAdapter adapter, BluetoothDevice device, byte[] payload, int rssi)
adapter
- the adapter which is performing the scan.device
- the device which has sent the advertisement.payload
- the advertisement data.rssi
- the RSSI measurement.BluetoothAdapter.startScanning(ScanCallbacks)
,
BluetoothAdapter.stopScanning()
void onScanCompleted(BluetoothAdapter adapter)
adapter
- the adapter which was performing the scan.BluetoothAdapter.startScanning(ScanCallbacks)
,
BluetoothAdapter.stopScanning()