即使在其他应用找到我的位置后,getLastKnownLocation已过期!

时间:2010-02-04 08:41:25

标签: android geolocation

在我的应用程序中,我请求位置更新并使用LocationListener,并且大部分时间一切正常。当应用程序启动时,它会在等待第一个位置更新时使用getLastKnownLocation。

我一直在对getLastKnownLocation进行一些测试,结果很奇怪......

如果getLastKnownLocation的结果已过期,那么我退出应用并运行Google地图并等待它取回我的位置,然后当我重新运行我的应用时,getLastKnownLocation仍会返回旧位置。我不明白为什么会这样。当然,如果GMaps可以得到修复,那么getLastKnownLocation应该是最新的,对吗?

0 个答案:

没有答案