android - how to retrieve the country name and other information as long + lat -
this question exact duplicate of:
i can retrieve other location information: country, city postal code ...
i use method retrieve object:
public address getaddress(double lat, double lng) { try { geocoder geocoder = new geocoder(contexts.getappcontext(), locale.getdefault()); threadtrack th = new threadtrack(); th.run();// pour attendre 50sec list<address> addresses = geocoder.getfromlocation(lat, lng, 1); address obj = addresses.get(0); return obj; } catch (ioexception e) { return null; } }
i not have test smartphone android emulator, when displaying data displays fatal error, reply problem due using emulator not smartphone, how solve problem?
you can retrieve latitude, longitude , location info. please let me know if want other this...
Comments
Post a Comment