-8

I Want to get location every 30 seconds in background. But things is that right now when phone screen locked. It stops to get location. so whats the solution for this?

rmaddy
  • 314,917
  • 42
  • 532
  • 579

1 Answers1

0

You can use location background mode to monitor location changes in background, however, you can't specify time interval - the system will call CLLocationManagerDelegate methods whenever location change occurs.

Also, according to background modes documentation, you are encouraged to use standard location services in background sparingly, or limit yourself to monitoring significant location changes - all because of battery drain.

mag_zbc
  • 6,801
  • 14
  • 40
  • 62