val scanCallback = ScanCallback.Builder()
.setOnScanFailed { }
.setOnBatchScanResult { }
.setOnScanResult { _, _ -> }
.build()
EasyBluetoothScanner.Builder(context, scanCallback)
.setScanFilters(emptyList())
.setScanSettings(ScanSettings.Builder().build())
.build()
EasyBluetoothScanner.build(
context = context,
scanCallback = ScanCallback.build {
setOnScanResult { callbackType, result ->
// do something
}
setOnBatchScanResult { results ->
// do something
}
setOnScanFailed { exception ->
// do something
}
}
) {
// Native Scan Filters are already prepared with builder
scanFilters = listOf<ScanFilter>()
// Native Scan Settings is already prepared with builder
scanSettings = ScanSettings.Builder().build()
}