public class BackgroundScannerImpl extends java.lang.Object implements 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. |
public void scanBleDeviceInBackground(android.app.PendingIntent callbackIntent,
ScanSettings scanSettings,
ScanFilter... scanFilters)
BackgroundScanner
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.
scanBleDeviceInBackground in interface BackgroundScannercallbackIntent - Intent that will be executed when the scan result becomes availablescanSettings - Scan settingsscanFilters - Filtering settingspublic void stopBackgroundBleScan(android.app.PendingIntent callbackIntent)
BackgroundScannerPendingIntent callback.stopBackgroundBleScan in interface BackgroundScannercallbackIntent - A callback intent that was previously used to initiate a scanpublic java.util.List<ScanResult> onScanResultReceived(android.content.Intent intent)
BackgroundScannerIntent from a PendingIntent based scan to a handy RxAndroidBLE enabled
ScanResultonScanResultReceived in interface BackgroundScannerintent - Intent containing scan result or an error code