Android Geocoder *suddenly* not returning street address, only city -
i have simple code homecoming address latitude/longitude coordinates. used work fine yesterday, nil has changed, today returns city instead of street address.
i know can dig deeper address class , explicitly phone call getthoroughfare()
, homecoming null.
geocoder geocoder = new geocoder(mainactivity.this, locale.getdefault()); seek { list<address> addresses = geocoder.getfromlocation(lat, lon, 1); homecoming addresses.get(0).getaddressline(0); }
no emulators, nexus 5.
update: it's magic, today geocoder working fine again! note longitude/latitude coordinates have remained same whole time. perhaps i'll rely on getthroughfare() street address, business relationship fact may not homecoming me value.
this due reliability issue in geocoder service. longitude/latitude coordinates have remained same in unit tests, , time time city returned instead of total address.
don't rely on geocoder service homecoming total address!
android google-geocoder
No comments:
Post a Comment