android - how to retrieve the country name and other information as long + lat -


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?

check out link

you can retrieve latitude, longitude , location info. please let me know if want other this...


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -