Metwalli
Metwalli

Reputation: 1891

Scanning for BLE devices on Android 8+ in the background

I'm using the following method from BLE scanner API on Android 8+ to scan for BLE Beacons

startScan(List<ScanFilter> filters, ScanSettings settings, 
PendingIntent callbackIntent)

The problem is that after sometimes I can see Scan Logs but nothing is delivered by the callbackIntent any idea why is this happening?

Upvotes: 2

Views: 6141

Answers (1)

Metwalli
Metwalli

Reputation: 1891

This is the expected behavior on Android 8+. if you need to scan continuously a periodic mechanism is needed in this case. For more information about scanning on different Android versions and different ways. Have a look here

Upvotes: 2

Related Questions