I am using android beacon library for beacon scan. And My android device is running Android 6 ( Samsung Galaxy S5).
In background mode, The app is not detecting beacon for 5 sec. (Not getting scan result callback). then it will work for 11 sec(every new scan cycle) and again it stops for 5 sec.
Note: For Android 8 and 9 it's working without issue.
These are the parameter I am using for the scan.
setBackgroundBetweenScanPeriod(1100l);
setBackgroundScanPeriod(11000l);
As per logs, I observe that scheduleScanCycleStop()
only calling that 5-sec interval(at every second).
By modifying setBackgroundScanPeriod
to 1100
then its working fine. Is it possible to achieve the same behavior with larger BackgroundScanPeriod value?
Can anyone explain where I am doing wrong?
Thanks