[英]android reverse geocoding not working on huawei device
I am trying to reverse Geocode lat,long by this piece of code我正在尝试通过这段代码反转地理编码纬度
Geocoder geocoder = new Geocoder(context, Locale.ENGLISH);
try {
List<Address> addresses = geocoder.getFromLocation(latitude, longitude, 1);
return addresses;
} catch (IOException e) {
Log.e("Error : Geocoder", "Impossible to connect to Geocoder", e);
}
Its working on all devices except Huawei.It is giving exception in Huawei device.它适用于除华为以外的所有设备。它在华为设备中例外。 Client reported on his huawei device, Huawei Y625 running on kitkat.
客户在他的华为设备上报告了运行在kitkat上的华为Y625。 I tested it on huawei H30 running kitkat and its not working also.
我在运行 kitkat 的 huawei H30 上对其进行了测试,但它也无法正常工作。 However running on all other devices tested inc Samsung, Nexus etc.
然而,在所有其他经过测试的设备上运行,包括三星、Nexus 等。
Any help would be appreciated.任何帮助将不胜感激。
There is a problem with some android devices and the geocoder not working:某些 android 设备存在问题,并且地理编码器无法正常工作:
https://code.google.com/p/android/issues/detail?id=38009 https://code.google.com/p/android/issues/detail?id=38009
A reboot seems to fix the issue.重启似乎解决了这个问题。
大多数华为手机不支持 GMS 地图服务,它只支持 HMS 地图服务。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.