public interface BackgroundScanner
| Modifier and Type | Method and Description |
|---|---|
java.util.List<ScanResult> |
onScanResultReceived(android.content.Intent intent)
Callback that may be used to map received
Intent from a PendingIntent based scan to a handy RxAndroidBLE enabled
ScanResult |
void |
scanBleDeviceInBackground(android.app.PendingIntent callbackIntent,
ScanSettings scanSettings,
ScanFilter... scanFilters)
Submits a scan request that will work even if your process gets killed by the system.
|
void |
stopBackgroundBleScan(android.app.PendingIntent callbackIntent)
Stops previously initiated scan with a
PendingIntent callback. |
void scanBleDeviceInBackground(android.app.PendingIntent callbackIntent,
ScanSettings scanSettings,
ScanFilter... scanFilters)
When the PendingIntent is delivered, the Intent passed to the receiver or activity
will contain one or more of the extras BluetoothLeScanner.EXTRA_CALLBACK_TYPE,
BluetoothLeScanner.EXTRA_ERROR_CODE
and BluetoothLeScanner.EXTRA_LIST_SCAN_RESULT to indicate the result of the scan.
scanSettings - Scan settingsscanFilters - Filtering settingscallbackIntent - Intent that will be executed when the scan result becomes availableBleScanException - thrown if not possible to start the scanvoid stopBackgroundBleScan(android.app.PendingIntent callbackIntent)
PendingIntent callback.callbackIntent - A callback intent that was previously used to initiate a scanjava.util.List<ScanResult> onScanResultReceived(android.content.Intent intent)
Intent from a PendingIntent based scan to a handy RxAndroidBLE enabled
ScanResultintent - Intent containing scan result or an error codeBleScanException - scan failure