【问题标题】:locations are received before locationRequest.setFastestInterval在 locationRequest.setFastestInterval 之前收到位置
【发布时间】:2014-12-10 10:50:23
【问题描述】:

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

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

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

【问题讨论】:

    标签: android location location-client


    【解决方案1】:

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

    还可以观看此视频了解更多信息: https://youtu.be/81W61JA6YHw

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-26
      • 2020-01-24
      • 1970-01-01
      • 2012-01-10
      相关资源
      最近更新 更多