简体   繁体   English

如何在室内的android中通过GPS访问我当前的位置?

[英]How to access my current location via GPS in android in indoor?

I cannot access current location via GPS in indoor in my application in android because the GPS signal is weak in indoor. 我无法在android应用中通过室内的GPS访问当前位置,因为室内的GPS信号较弱。 But Google map in android access the current location very fine using GPS in indoor. 但是,Android中的Google地图可以在室内使用GPS很好地访问当前位置。 What should I do inorder to access my current location using GPS in android in indoor ? 为了在室内使用android中的GPS访问当前位置,该怎么办?

GPS is generally bad indoors so you cannot rely on it. GPS通常在室内不好,因此您不能依靠它。 Try getting the location via wifi location. 尝试通过wifi位置获取位置。 Which can be very accurate 哪个可能非常准确

You do this like so 你这样做

locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener); locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,0,0,locationListener);

Take a look at this guide 看看这个指南

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM