如何从 GPS 和 GPRS 获取位置值?
我尝试通过 android.Location 类获取纬度和经度值,但有时我的系统无法获取正确的值;纬度:0.00,经度:0.00。也许它返回一个不正确的值,因为 Android 仅检测 GPS。
现在,我知道位置值可以通过GPRS/WiFi检测到,我该如何获取它?
I'm try to get latitude and longitude values via the android.Location
class, but sometimes my system can't get the correct value; it is lat: 0.00 and lng: 0.00. Perhaps it returns an incorrect value because Android detects GPS only.
Now, I know that location value can detect by GPRS/WiFi, and how do I get it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用
LocationManager.NETWORK_PROVIDER
。以下是文档和示例:http://developer.android.com /guide/topics/location/obtaining-user-location.html
Use
LocationManager.NETWORK_PROVIDER
. Here are docs and examples:http://developer.android.com/guide/topics/location/obtaining-user-location.html