2

我已将间隔和最快间隔设置为,

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);

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

4

1 回答 1

2

降低setFastestInterval速率很可能会导致更稳定的位置更新。

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

于 2015-09-23T01:17:37.110 回答