0

Possible Duplicate:
Time based GPS location in background (iphone)

I am trying to get the iPhone's location periodically. When the app goes into background, a new thread is created and wants to get user's location, and then goes to sleep for X minutes. Then wakes up, gets user's location again and goes back to sleep.

When the thread wakes up, I need to get the location. I can't user the CLLocationMangerDelegate because that updates on its own and calls the delegate method whenever it wants. I need to somehow get the user's location whenever the thread wakes up.

Can anyone help me please? I would really appreciate it!

Thanks!

Community
  • 1
  • 1
Arman Shan
  • 101
  • 1
  • 3

1 Answers1

0

as far as i know it's not possible to achieve this through a scheduled method call (as you mentioned). i had similar problem and i solved it by having a CLLocationManager that triggers whenever the user's location is changed for about 1 KM.

the drawback of this implementation is the battery consumption.

Kassem
  • 1,481
  • 3
  • 20
  • 42