【发布时间】:2012-10-31 07:15:38
【问题描述】:
场景:
用户可以选择一个时间间隔(如5h)。每隔 15 分钟,我会检查用户的当前位置,并根据位置采取措施。
问题:
那么,哪个最好?
我是否需要 LocationListener 或 getLastKnowLocation() 基于一些应该解决的标准?
【问题讨论】:
标签: android service location broadcastreceiver
场景:
用户可以选择一个时间间隔(如5h)。每隔 15 分钟,我会检查用户的当前位置,并根据位置采取措施。
问题:
那么,哪个最好?
我是否需要 LocationListener 或 getLastKnowLocation() 基于一些应该解决的标准?
【问题讨论】:
标签: android service location broadcastreceiver
用AlarmManager 实现BroadcastReceiver 和setInexactRepeating。在它使用标准处理你的getLastKnowLocation() 并在任何你想要的地方发送广播
【讨论】: