无法连接到互联网

发布于 2024-11-24 05:00:56 字数 233 浏览 2 评论 0原文

我使用 CLLocationManager 来确定当前位置,并使用maps.google.com 进行反向地理编码。每当我从 wifi 切换到 3g 网络并尝试运行获取当前位置的应用程序时,即使我有良好的 3g 信号,地图应用程序也会启动并显示一条消息“无法连接到互联网”。

这种事每次都会发生。有人见过这种行为吗?除了阻止该应用程序在后台运行之外,还有其他方法可以解决此问题吗?我正在释放 locationmgr 对象,因此没有缓存。

I'm using CLLocationManager to determine the current location and i'm using maps.google.com for reverse geocoding. Whenever I switch from wifi to 3g network and try to run my app which gets the current location, the map application launches with a message 'could not connect to the internet' even though i have a good 3g signal.

This happens everytime. Anyone seen this type of behavior before ? Any ways to work around it besides preventing the app in the background? I am releasing the locationmgr object so there is no cache.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文