Best way to constantly monitor location

前端 未结 2 566
北恋
北恋 2021-02-09 18:35

I want to monitor a user\'s location on a regular basis, like Google Latitude does. Something that would wake the phone up every X minutes, even if the app is currently not run

相关标签:
2条回答
  • 2021-02-09 18:47

    I've tried just using LocationManager for this and did not have much luck. Hence, I rolled a LocationPoller that, in conjunction with your own _WAKEUP alarms, should handle this scenario.

    0 讨论(0)
  • 2021-02-09 19:11

    Have you looked into writing a service to handle this?

    I would be a bit concerned about battery life though, so I'd make the 'X' configurable, if that's appropriate

    0 讨论(0)
提交回复
热议问题