Sample Header Ad - 728x90

Background ble scan in one plus

0 votes
0 answers
182 views
We are trying to build an app which scan nearby Bluetooth devices and shows on the UI, we also have event listener which detects whenever location or bluetooth state is changed and accordingly we start the Bluetooth scan, we also make sure no more then 5 bleScan happens within 30 seconds. Now heres the problem, This app works fine for phones like Nokia, Asus etc, but for one plus what we have noticed is, whenever we are in background, and we disabled and enabled bluetooth, it dosent start the scan(in the code it reaching but no errors are been thrown) nor it throws error in onScanFailed callback, we didnt see this behavior in other phone so it dosnet work if the setting is the following enter image description here but if we make the location "Allow all the time" , then it works perfectly enter image description here My question is who is doing it properly one plus or other phones? Am i missing some additional settings for one plus. please help
Asked by Dom (101 rep)
Apr 26, 2021, 12:08 PM