如何从 GPS 和 GPRS 获取位置值?

发布于 2024-10-02 13:14:02 字数 147 浏览 8 评论 0原文

我尝试通过 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

春风十里 2024-10-09 13:14:02

使用 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文