I am using M7 processor motion activity in one of my applications. I want to get motion activity updates when the app is in suspended state also. I dont want to call startUpdatingLocation to keep prevent from enterning the app into suspended state, since it consumes large amount of battery. I have set region monitoring when app enters background but still I am not getting motion updates.
Is there any way other than calling startUpdatingLocation to get motion activity updates in suspended state?
Monitoring a CLRegion will continue when you app is backgrounded (in a "suspended state"). You do not need to call startUpdatingLocation for this to occur, just register them with
startMonitoringForRegion:
. Make sure you have enabled the Location Updates background mode under Capabilities of your project file.You may also want to set
pausesLocationUpdatesAutomatically = NO
on your location manager, otherwise monitoring will stop after about 15 minutes if the user stops moving.Also it is worthy to note that all monitoring of regions for you app will stop if the user terminates you app in the multitasker.