在locationRequest.setFastestInterval之前接收位置

时间:2014-12-10 10:50:23

标签: android location location-client

我已将Interval和Fastest Interval设置为

locationRequest.setInterval(30 * 60 * 1000); //30 minutes
locationRequest.setFastestInterval(30 *60 * 1000); //30 minutes

但我有时会在30分钟之前收到位置更新,并且间隔不均匀。例如,有时在3分钟,4分钟,10分钟之后接收位置更新。

我的待定意图设为,

mPendingIntent = PendingIntent.getService(context, 0, mIntentService, PendingIntent.FLAG_UPDATE_CURRENT);

这是预期的行为还是我需要以其他方式处理它?<​​/ p>

1 个答案:

答案 0 :(得分:2)

降低setFastestInterval费率很可能会带来更稳定的位置更新。

另请查看此视频以获取更多信息: https://youtu.be/81W61JA6YHw