- Create new instance of GoogleGeocode.
- GoogleGeocode has two constructors. You can use either:
- Lat and Lng; or
- Address
- Assign the result as JSONObject object.
- If it's succeed, the result will be not null. Otherwise, null.
String lat = "-6.234567";
String lng = "106.23123";
GoogleGeocode geocode = new GoogleGeocode(lat, lng);
JSONObject result = geocode.getReverseGeo();
// you can check for the result here
if (result != null) {
// Success. result contains the information needed.
} else {
// failed.
}