【发布时间】:2015-11-01 10:02:25
【问题描述】:
当我运行此处找到的“位置地址”示例时: https://github.com/googlesamples/android-play-location
应用仅在连接到 WiFi 时获取地址。当我关闭 WiFi 并使用 LTE 时,我看到“抱歉,该服务不可用”。
我正在尝试将此代码传输到我自己的项目中,但我希望它能够使用移动互联网和 WiFi 工作。
有人知道为什么会这样吗?
logcat 跟随超时:
09-28 21:05:40.219 16344-19027/com.google.android.gms.location.sample.locationaddress E/fetch-address-intent-service﹕ Sorry, the service is not available
java.io.IOException: Timed out waiting for response from server
at android.location.Geocoder.getFromLocation(Geocoder.java:136)
at com.google.android.gms.location.sample.locationaddress.FetchAddressIntentService.onHandleIntent(FetchAddressIntentService.java:92)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.os.HandlerThread.run(HandlerThread.java:61)
【问题讨论】:
-
您可以在尝试与 LTE 连接时发布日志吗?
标签: android location google-play-services reverse-geocoding