kkmhogen / KBeaconProDemo_Android

An android-based demo for connecting KBeaconPro devices
MIT License
7 stars 8 forks source link

BLE Scan does not work on Android 12 when Screen is OFF #1

Closed asifmahmood2022 closed 17 hours ago

asifmahmood2022 commented 1 year ago

Hi we are trying to scan from background service and our application has all the permissions required by Android 12 as long as screen is on background service is able to find the W7 tether but as soon as we turn off the screen scanning not able to find any device.

kkmhogen commented 2 weeks ago

This may be determined by the mechanism of Android, where the app starts Bluetooth scanning in the background. The Android system may intermittently scan according to the system's policies. Additionally, you may need to start a foreground service and then initiate scanning within the service.