We use the forecast for the Google Places API, similar to the one in the sample application. When choosing a result, we get details for the predicted location using:
Places.GeoDataApi.getPlaceById(mGoogleApiClient, placeId);
This works great, my problem is that the result only contains the string address.
When using the JS version of the API, the result contains the following:
"address_components" : [ { "long_name" : "522", "short_name" : "522", "types" : [ "street_number" ] }, { "long_name" : "Overtoom", "short_name" : "Overtoom", "types" : [ "route" ] }, { "long_name" : "Amsterdam-West", "short_name" : "Amsterdam-West", "types" : [ "sublocality_level_1", "sublocality", "political" ] }, { "long_name" : "Amsterdam", "short_name" : "Amsterdam", "types" : [ "locality", "political" ] }, { "long_name" : "Amsterdam", "short_name" : "Amsterdam", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Noord-Holland", "short_name" : "NH", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "Nederland", "short_name" : "NL", "types" : [ "country", "political" ] }, { "long_name" : "1054", "short_name" : "1054", "types" : [ "postal_code_prefix", "postal_code" ] } ],
But the above information inside address_components missing when using the API on Android. How to get this information on Android using Google APIs?