I\'m a beginner in android app development. I\'ve tried reading the documentation but am getting nowhere (functions in Android\'s tutorial such as StartLeScan()
hav
I had been playing with BLE scan for a while until I got the simplest solution from Nordic library.
Add a line to your build.gradle:
dependencies {
....
compile 'no.nordicsemi.android.support.v18:scanner:1.0.0'
}
And use BluetoothLeScannerCompat:
import no.nordicsemi.android.support.v18.scanner.BluetoothLeScannerCompat;
...
BluetoothLeScannerCompat scanner = BluetoothLeScannerCompat.getScanner();
scaner.startScan(new ScanCallback { ...});
And the library does all job.