Android Question Location: Getting country name

trueboss323

Active Member
Licensed User
Longtime User
Hello, is there a simple way to get the country name using the device's location? For example
Msgbox("You are in " & countryname &,"")
 
Last edited:

Mark Read

Well-Known Member
Licensed User
Longtime User
You could use the lon and lat coordinates (obtained from GPS, wifi or 3G) and the reverse geocode them with google.

Example:https://maps.googleapis.com/maps/api/geocode/json?latlng=47.3763900,15.0911300

will return the json below which you will need to parse.

or you could use the library from Warwound

https://www.b4x.com/android/forum/threads/geocoder-library.17115/#content
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…