Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
该类通常返回一个 OLD 位置。我通常需要 run() 几次才能返回正确的位置。有什么想法吗?
源代码:
http://pastebin.com/JacG3JqJ
检查这个问题 Android - Reliably getting the current location
并注意
Location location=lm.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);