Answer the question
In order to leave comments, you need to log in
How to improve the reliability of the BLE scanner in the background in iOS?
Hello!
We are developing an application that in the background (background) should determine the position of the phone in the premises, based on the BLE iBeacon. Every 30 seconds we run the scanner for 10 seconds to get the RSSI data of our beacons (the UUID is static for all beacons, we filter by it, Major and Minor are unique for each beacon). Then we filter the RSSI values and get the closest beacon to the user. Beacon transmission frequency = 1Hz.
We can’t achieve reliable operation of the service in the background, it either stops working, then starts again.
Flow description:
locationManager(_ manager: CLLocationManager, didRangeBeacons beacons: [CLBeacon], in region: CLBeaconRegion)
UIApplication.shared.beginBackgroundTask
Timer()
for 10 secondsplist
and settings in the application responsible for working in the background have been added. User allows Always use location
Answer the question
In order to leave comments, you need to log in
I suspect that in your project settings it is written that the task background is needed for the location track.
And the system, in this case, decides when to launch your process for the location track. Because she is smarter.
Every time the same thing. Lastly, remember:
- The state when your application is in a disabled state , you can do absolutely NOTHING .
- The state when your application is in a minimized state , you can only do a very small number of actions with even less time allotted for this task. Time in this case is absolutely uncontrollable. The system itself decides when and what to run in this state.
Therefore, this kind of application that tries to do something in a minimized state in the desired IM cannot and will not exist.
Which I completely agree with Apple. Who needs an application that, on a whim, will do in the background what it wants and, most importantly, when it wants. If I closed it or turned it off, then it is not interesting to me.
use the same method only without passing value to it, and applying not to window, but to the desired element
The documentation describes in detail https://api.jquery.com/scrollTop/ (the first case, and you, apparently, about the second)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question