public abstract class ScanCallback
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
SCAN_FAILED_ALREADY_STARTED
Fails to start scan as BLE scan with the same settings is already started by the app.
|
static int |
SCAN_FAILED_APPLICATION_REGISTRATION_FAILED
Fails to start scan as app cannot be registered.
|
static int |
SCAN_FAILED_FEATURE_UNSUPPORTED
Fails to start power optimized scan as this feature is not supported.
|
static int |
SCAN_FAILED_INTERNAL_ERROR
Fails to start scan due an internal error
|
Constructor and Description |
---|
ScanCallback() |
Modifier and Type | Method and Description |
---|---|
void |
onBatchScanResults(java.util.List<ScanResult> results)
Callback when batch results are delivered.
|
void |
onScanFailed(int errorCode)
Callback when scan could not be started.
|
void |
onScanResult(int callbackType,
ScanResult result)
Callback when a BLE advertisement has been found.
|
public static final int SCAN_FAILED_ALREADY_STARTED
public static final int SCAN_FAILED_APPLICATION_REGISTRATION_FAILED
public static final int SCAN_FAILED_INTERNAL_ERROR
public static final int SCAN_FAILED_FEATURE_UNSUPPORTED
public void onScanResult(int callbackType, ScanResult result)
callbackType
- Determines why this callback was triggered:
com.reelyactive.blesdk.support.ble.ScanSettings.CALLBACK_TYPE_FIRST_MATCH: the first (recent) scan result for this beacon
com.reelyactive.blesdk.support.ble.ScanSettings.CALLBACK_TYPE_ALL_MATCHES: a regular scan result
com.reelyactive.blesdk.support.ble.ScanSettings.CALLBACK_TYPE_MATCH_LOST: a lost match indicationresult
- A Bluetooth LE scan result.public void onBatchScanResults(java.util.List<ScanResult> results)
results
- List of scan results that are previously scanned.public void onScanFailed(int errorCode)
errorCode
- Error code (one of SCAN_FAILED_*) for scan failure.