Reputation: 3430
I use Geocoder.getFromLocationName to validate an address inserted by the user. I check the returned ArrayList and if it's exaclty one result everything's fine. I also use bounds so I only get results within a certain area (Geocoder ). This worked fine for a long time, before it suddenly stopped working sometime last week. The returned results are now always the same and always have nothing to do with the string that I passed as address name...
When I remove the bounds it works fine. Has anybody experiences similar problems? Has Google changed anything in the implementation of the function?
Upvotes: 4
Views: 850
Reputation: 11756
We started experiencing this recently too. I found this bug that someone filed two days ago on the AOSP issue tracker:
https://code.google.com/p/android/issues/detail?id=75575
I also created a small sample open-source project to demonstrate the issue:
https://github.com/barbeau/GeocoderDemo
As you say, it seems to always return the same generic results no matter what the search term is if you use a bounding box:
Without a bounding box, it correctly returns results specific to the search term, although these are global in scope and not of much use without further filtering.
The main problem here is that historically Google has labeled Android Geocoder issues on the AOSP issue tracker as "Wrong Forum", so I'm not overly optimistic about support there.
I've posted to the Android Developer forum:
https://groups.google.com/forum/#!topic/android-developers/KuZDVRXyTc0
...and Google+ in hopes of raising the issue there:
https://plus.google.com/+SeanBarbeau/posts/Mm5YwzeUoZV
EDIT
As of October 2014 it appears that this issue is resolved.
Upvotes: 3