diff --git a/src/main/java/org/altbeacon/beacon/service/scanner/CycledLeScannerForLollipop.java b/src/main/java/org/altbeacon/beacon/service/scanner/CycledLeScannerForLollipop.java index 011c890d1..280fa056f 100644 --- a/src/main/java/org/altbeacon/beacon/service/scanner/CycledLeScannerForLollipop.java +++ b/src/main/java/org/altbeacon/beacon/service/scanner/CycledLeScannerForLollipop.java @@ -9,6 +9,7 @@ import android.bluetooth.le.ScanSettings; import android.content.Context; import android.content.Intent; +import android.os.Build; import android.os.ParcelUuid; import android.os.SystemClock; import android.support.annotation.MainThread; @@ -183,7 +184,11 @@ protected void startScan() { // for a change in Android 8.1 that blocks scan results when the screen is off unless // there is a scan filter associatd with the scan. Prior to 8.1, filters could just be // left null. The wildcard filter matches everything. - filters = new ScanFilterUtils().createWildcardScanFilters(); + // We only add these filters on 8.1+ devices, because adding scan filters has been reported + // to cause scan failures on some Samsung devices with Android 5.x + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) { + filters = new ScanFilterUtils().createWildcardScanFilters(); + } } if (settings != null) {