title: How to use AddressComponents from the new Places API?
body: <p>I've been using the new Places API for Android. I want to know how to get City, Country etc details from AddressComponents.</p>
  
  <p>This is how I'm using it:</p>
  
  <pre><code>private void initializePlacesAPI()
      {
          if(!Places.isInitialized())
          {
              Places.initialize(context.getApplicationContext(), Constants.GOOGLE_API_KEY);
          }
      }
  
  private void launchPlacesAPI(int requestCode)
      {
          // Set the fields to specify which types of place data to return after the user has made a selection.
          List&lt;Place.Field&gt; fields = Arrays.asList(Place.Field.NAME, Place.Field.LAT_LNG, Place.Field.ADDRESS, Place.Field.ADDRESS_COMPONENTS);
  
          // Start the autocomplete intent.
          Intent intent = new Autocomplete.IntentBuilder(
                  AutocompleteActivityMode.OVERLAY, fields)
                  .setCountry(Constants.COUNTRY_CODE_CANADA)
                  .setHint(context.getString(R.string.start_typing_an_address))
                  .build(context);
          startActivityForResult(intent, requestCode);
      }
  </code></pre>
  
  <p>When a <code>Place</code> object is received in <code>onActivityResult</code>, how do I use the <code>AddressComponents</code> object received there? It has no getters/setters.</p>