Android getLastKnownLocation即使在其他应用程序找到我的位置后也已过期!

Android getLastKnownLocation即使在其他应用程序找到我的位置后也已过期!,android,geolocation,Android,Geolocation,在我的应用程序中,我请求位置更新,并使用LocationListener,大多数情况下一切正常。应用程序启动时,在等待第一次位置更新时使用getLastKnownLocation 我在getLastKnownLocation上做了一些测试,结果很奇怪 如果getLastKnownLocation的结果已过期,则我退出应用程序并运行Google Maps,等待它获取我的位置,然后重新运行应用程序时,getLastKnownLocation仍返回旧位置。我不明白为什么会这样。当然,如果GMAP可以得

在我的应用程序中,我请求位置更新,并使用LocationListener,大多数情况下一切正常。应用程序启动时,在等待第一次位置更新时使用getLastKnownLocation

我在getLastKnownLocation上做了一些测试,结果很奇怪


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

当您调用getLastKnownLocation()时,您要将哪个位置提供程序作为参数传递?或者,由于这个问题已经存在了2年,您可能已经找到了解决方案;-)我有类似的问题,你能解决吗?