This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Android BluetoothLeScannerCompat beginner question

I am trying to use the BluetoothLeScannerCompat for Android library and have the following problem:

At Github I find:

BluetoothLeScannerCompat scanner = BluetoothLeScannerCompat.getScanner();
	ScanSettings settings = new ScanSettings.Builder()
				.setLegacy(false)
				.setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)
				.setReportDelay(1000)
				.setUseHardwareBatchingIfSupported(true)
				.build();
	List<ScanFilter> filters = new ArrayList<>();
	filters.add(new ScanFilter.Builder().setServiceUuid(mUuid).build());
	scanner.startScan(filters, settings, scanCallback);

In my Android project there is no add for the filters.add. line.
Any idea, of what I am missing.
I already imported the no.nordicsemi.android.support.v18.scanner.BluetoothLeScannerCompat, but something different is missing.
I am an Android newbee.

Parents Reply Children
Related