有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java getLastLocation最近有多久了?

我目前正在为自己制作一个Android应用程序,为了好玩,并希望获得当前位置<也许我会在Play Store上发布这个

我在用最方便的方式获取当前位置,但由于注释here,我决定用谷歌方式。最终,我的研究让我进入了一个getLastLocation{a2}

然而,让我不安的是,它多久更新一次?有没有办法知道这个地方最近有多近?当我调用该方法时,设备是否会尝试更新“最后位置”,然后将其返回给我

我试图对此进行研究,但我得到的最好答案是

Returns the best most recent location currently available.


共 (1) 个答案

  1. # 1 楼答案

    what bugs me is how often does this get updated?

    可能永远不会

    Is there a way to know how recent this location is?

    a ^{} method on ^{}告诉你Location被确定的系统时间

    When I call that method, will the device try to update "last location" then return it to me?

    没有