我需要粗略地跟踪用户的位置,但不是实时的。在应用程序启动时处理位置更新就足够了。但是,我仍然需要知道应用未运行时用户所在的位置。
有没有办法在应用程序中获取位置历史记录?
我真的不想让服务一直只轮询最后已知的位置,因为那会浪费电池电量。
最佳答案
However, I still need to know where the user was when the app wasn't running.
那是不可能的。
I don't really want to have a service just polling last known location all the time since that would be a waste of battery power.
然后消除对位置历史记录的要求。您只会获得您请求的位置。
关于android - 在 Android 应用程序中获取位置历史记录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23655655/