在安卓4.1.1已经NETWORK_PROVIDER的行为改变了吗? [英] Has NETWORK_PROVIDER behavior changed in Android 4.1.1?

查看:194
本文介绍了在安卓4.1.1已经NETWORK_PROVIDER的行为改变了吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经有一个经过充分测试的应用程序,利用 GPS_PROVIDER NETWORK_PROVIDER 用相同的 LocationListener的

I have an existing well-tested app that utilizes the GPS_PROVIDER and NETWORK_PROVIDER with the same LocationListener.

LocationManager 报道全球定位系统,网络和无源定位提供商提供并启用。

LocationManager reports gps, network, and passive location providers are available and enabled.

我最近升级了我的Galaxy Nexus的4.1.1现在 NETWORK_PROVIDER 不提供任何位置变化。用的Galaxy S III运行4.0.4的测试工作,因为我习惯了,随着网络位置更新未来通过,即使无线网络被关闭。当无线网络关闭时,我得到的手机信号塔的位置。

I have recently upgraded my Galaxy Nexus to 4.1.1 and now the NETWORK_PROVIDER does not deliver any location changes. Testing with an Galaxy S III running 4.0.4 works as I am accustomed to, with network location updates coming through, even if WiFi is turned off. When WiFi is turned off, I get the cell tower position.

说到与同事在这里,我不能排除某种巧合硬件故障,或者我还没有找到某种默认设置的变化。我双重检查整个设置,似乎一切都正确设置。

Talking with colleagues here, I can't rule out some kind of coincidental hardware failure or some sort of default setting change that I haven't found. I've double checked throughout the settings and it appears that everything is properly set.

WiFi是上,小区网络上,GPS是,网络服务都启用。我在我的办公桌上没有GPS信号,所以很容易在网络位置未能提供结果的通知。

WiFi is on, Cell network is on, GPS is on, network services are all enabled. I have no GPS signal at my desk, so it's easy to notice when the network location fails to provide a result.

任何人都遇到了与Verizon Galaxy Nexus的+ 4.1.1或4.1.1以及任何手机类似问题?

Anyone else running into similar issues with Verizon Galaxy Nexus + 4.1.1, or 4.1.1 and any phone?

作为一个额外的皱纹,谷歌地图是找到我的位置,但我的 PASSIVE_PROVIDER 不产生任何位置。

As an additional wrinkle, Google Maps is finding my location, but my PASSIVE_PROVIDER is not generating a location either.

推荐答案

机器人的行为并没有就改变了 NETWORK_PROVIDER

The behavior of Android has not changed with regard to the NETWORK_PROVIDER.

我不知道哪里出了问题还是什么原因,但我删除/更换电池和SIM卡在我的Galaxy Nexus的和网络提供商似乎提供正确的结果。

I don't know what went wrong or why, but I removed/replaced the battery and SIM card on my Galaxy Nexus and the network provider seems to be providing the correct results.

在教训我?不要以为你永远不会得到一个位置报告给你的听众,即使你确信网络供应商是可用的,启用并连接。

The lesson for me? Do not assume you will ever get a location reported to your listener, even if you are certain that the network provider is available, enabled and connected.

在我的情况,我需要添加其他检查,以确保我的 LocationListener的不继续运行,如果我没有得到任何报告的位置。

In my case, I'll need to add another check to make sure my LocationListener does not keep running if I do not get any locations reported.

这篇关于在安卓4.1.1已经NETWORK_PROVIDER的行为改变了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆