How to parse Address from Google Places GeoDataApi for Android, (address_components missing)

Unfortunately the answer is "You can't."

Google does not supply structured response data to the Android implementation of that API.

You could try parsing the address text, but as per my answer to a related post, this is far from trivial:

  1. You figure out a clever way to parse that string. Unfortunately the actual street/suburb/town/province structure is not consistent across different areas (e.g. Cape Town in South Africa has a different sentence structure to Johannesburg in South Africa). So your parsing rules need to be very clever.
  2. You use a different Google API. The JavaScript API provides structured data for the related call. Unfortunately Google recommends against using this technique.

A colleague of mine has logged this issue with Google:

  • Issue 10019: Expose address components in Place object