如何获取不同语言的当前位置。我们需要添加一些库吗?我需要用阿拉伯语找到当前地址吗?我认为有阿拉伯语格式的谷歌地图。现在有没有办法获得阿拉伯语lamguage的当前地址?
public static final String GOOGLE_GEOCODER = "http://maps.googleapis.com/maps/api/geocode/json?latlng=";
public static String getAddressFromGPSData(double lat, double longi) {
HttpRetriever agent = new HttpRetriever();
String request = GOOGLE_GEOCODER + lat + ","
+ longi + "&sensor=true";
// Log.d("GeoCoder", request);
String response = agent.retrieve(request);
String formattedAddress = "";
if (response != null) {
Log.d("GeoCoder", response);
try {
JSONObject parentObject = new JSONObject(response);
JSONArray arrayOfAddressResults = parentObject
.getJSONArray("results");
JSONObject addressItem = arrayOfAddressResults.getJSONObject(0);
formattedAddress = addressItem.getString("formatted_address");
} catch (JSONException e) {
e.printStackTrace();
}
}
// Log.d("GeoCoder", response);
return formattedAddress;
}