Hello All,
I’ve created application which logs motion activity of user with CoreMotion framework and M7-chip functionality (I’m using CMMotionActivityManager).
Application works fine in foreground. But I need to check that event occurred in 3-7 seconds frame in background mode.
And I need to range iBeacons - check entering to specified zone in background mode and activate my test for the motion event
.According following review http://developer.radiusnetworks.com/2013/11/13/ibeacon-monitoring-in-the-background-and-foreground.html
the time for detection is about 4 minutes (in average and up to 15 minutes) in background mode.
Does exist any method or workaround to grab data for motion activity and ranging iBeacon in the background with better accuracy?
- I need to check that event occurred in 3-7 seconds frame and notify user.
My concept application works in the following way:
1. I’ve activated background mode flags for CoreLocation and Audio (it plays audio signal on event detection).
2. At start it requests authorization “always” for Core Location
3. On success it launches CLLocationManager updates with desiredAccuracy = kCLLocationAccuracyBest and distanceFilter = 4.0 meters.
4. then it starts motion activity tracking with CMMotionActivityManager::startActivityUpdatesToQueue for main queue.
5. The handler for motion activity updates save logs with location coordinates to file and notifies user when event detected.
Expected results:
The detection for event should be logged in time (with upper limit 3-7 seconds for activity timestamp).
The application should save coordinates which precisely shows the place when it occurred.
Actual results:
The updates from motion activity manager comes with big random pauses up to 5-6 minutes
and in this case my detector can’t guarantee that event occurred(or not) during these pauses.
I’ve used iPhone 6 for my tests.