11# Android BLE Scanner Compat library
22
3- [ ![ Download] ( https://api.bintray .com/packages/nordic/android/ no.nordicsemi.android.support.v18%3Ascanner/images/download .svg ) ] ( https://bintray.com/nordic/android/ no.nordicsemi.android.support.v18%3Ascanner/_latestVersion )
3+ [ ![ Download] ( https://maven-badges.herokuapp .com/maven-central/ no.nordicsemi.android.support.v18/scanner/badge .svg?style=plastic ) ] ( https://search.maven.org/artifact/ no.nordicsemi.android.support.v18/scanner )
44
55The Scanner Compat library solves the problem with scanning for Bluetooth Low Energy devices on Android.
66The scanner API, initially created in Android 4.3, has changed in Android 5.0 and has been extended in 6.0 and 8.0.
@@ -24,15 +24,30 @@ for more details.
2424
2525## Usage
2626
27- The compat library may be found on jcenter repository. Add it to your project by adding the
27+ The compat library may be found on Maven Central repository. Add it to your project by adding the
2828following dependency:
2929
3030``` Groovy
31- implementation 'no.nordicsemi.android.support.v18:scanner:1.4.2 '
31+ implementation 'no.nordicsemi.android.support.v18:scanner:1.4.4 '
3232```
3333
3434Projects not migrated to Android Jetpack should use version 1.3.1, which is feature-equal to 1.4.0.
3535
36+ As JCenter has shut down, starting from version 1.4.4 the library is available only on Maven Central.
37+ Make sure you have ` mavenCentral() ` in your main * build.gradle* file:
38+ ``` gradle
39+ buildscript {
40+ repositories {
41+ mavenCentral()
42+ }
43+ }
44+ allprojects {
45+ repositories {
46+ mavenCentral()
47+ }
48+ }
49+ ```
50+
3651## API
3752
3853The Scanner Compat API is very similar to the original one, known from Android Oreo.
@@ -59,7 +74,7 @@ To start scanning use (example):
5974 ScanSettings settings = new ScanSettings .Builder ()
6075 .setLegacy(false )
6176 .setScanMode(ScanSettings . SCAN_MODE_LOW_LATENCY )
62- .setReportDelay(1000 )
77+ .setReportDelay(5000 )
6378 .setUseHardwareBatchingIfSupported(true )
6479 .build();
6580 List<ScanFilter > filters = new ArrayList<> ();
0 commit comments