FileDocCategorySizeDatePackage
ScanCallback.javaAPI DocAndroid 5.1 API2229Thu Mar 12 22:22:10 GMT 2015android.bluetooth.le

ScanCallback

public abstract class ScanCallback extends Object
Bluetooth LE scan callbacks. Scan results are reported using these callbacks.
see
BluetoothLeScanner#startScan

Fields Summary
public static final int
SCAN_FAILED_ALREADY_STARTED
Fails to start scan as BLE scan with the same settings is already started by the app.
public static final int
SCAN_FAILED_APPLICATION_REGISTRATION_FAILED
Fails to start scan as app cannot be registered.
public static final int
SCAN_FAILED_INTERNAL_ERROR
Fails to start scan due an internal error
public static final int
SCAN_FAILED_FEATURE_UNSUPPORTED
Fails to start power optimized scan as this feature is not supported.
Constructors Summary
Methods Summary
public voidonBatchScanResults(java.util.List results)
Callback when batch results are delivered.

param
results List of scan results that are previously scanned.

    
public voidonScanFailed(int errorCode)
Callback when scan could not be started.

param
errorCode Error code (one of SCAN_FAILED_*) for scan failure.

    
public voidonScanResult(int callbackType, ScanResult result)
Callback when a BLE advertisement has been found.

param
callbackType Determines how this callback was triggered. Currently could only be {@link ScanSettings#CALLBACK_TYPE_ALL_MATCHES}.
param
result A Bluetooth LE scan result.