-
Notifications
You must be signed in to change notification settings - Fork 837
Description
My app constantly scans for beacons within a given arbitrary layout.
I'm following the basic logic of starting startRangingBeacons if inside and stopRangingBeacons if outside via the didDetermineStateForRegion function.
If the scan makes repeated start requests, you can see that additional scan starts are prevented by SCAN_FAILED_ALREADY_STARTED in the callback within the CycledLeScannerForLolipop class.
However, if the app is left unused for more than 3 days, the SCAN_FAILED_APPLICATION_REGISTRATION_FAILED message will appear in the callback when starting the scan.
Sometimes the issue can be resolved by rebooting the device or turning Bluetooth off and on, but in some cases it may be temporary or not resolved.
This symptom did not occur at all when targetSdkVersion was 33. Now, I have increased targetSdkVersion to 34 and most (almost all) of the cases experiencing this symptom are on Android OS 15.
- Is there a way to initialize the scanner space?
- Is there a way to find out if the scanner space is not freed because the reference to the scan that did not execute the stop Scan function is gone?