Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

core location autopause, effects of activity type

Hi does anyone know the effect that using different CLActivity type constants has on the behavior of auto pause? For example, will the location manager resume from a pause more readily if activityType is set to CLActivityTypeAutomotiveNavigation or CLAcitivtyTypeFitness?

Thanks for your help.

like image 982
Jeff Ames Avatar asked Mar 20 '13 03:03

Jeff Ames


1 Answers

The activity type flags affect the internal auto pause logic. For instance CLActivityTypeFitness is more likely to pause when the user is stationary with no accelerometer motion and when the user is moving fast with accelerometer motion similar to a vehicle and vice versa for CLActivityTypeAutomotiveNavigation. CLActivityTypeOther is supposed to be a catch-all setting for everything else. However the exact logic and thresholds are only known to Apple.

As far as I know, the location updates are only resumed if your app becomes active again, there is no auto-resume depending on the user motion. But you can always start region monitoring in your didPause callback to resume tracking again when the user does move.

like image 85
Engin Kurutepe Avatar answered Oct 12 '22 23:10

Engin Kurutepe