title: Autocomplete - only city
body: <p>Do somebody know how I can filtring this autocomplete, that user recive only city name? like only: London, Paris and etc, without the other result : "London Bridge", "London eye" and etc - like in example.
  I use in google places API Autocomplete,</p>
  
  <p>so I use this code filter:</p>
  
  <pre><code>public Filter getFilter() {
      Filter filter = new Filter() {
          @Override
          protected FilterResults performFiltering(CharSequence constraint) {
              FilterResults filterResults = new FilterResults();
              synchronized (filterResults) {
  
                  if (constraint != null) {
                      getAutocomplete(constraint);
                      result = mPlaceAPI.autocomplete(constraint.toString());
  
                      if (result != null) {
                          filterResults.values = result;
                          filterResults.count = result.size();
                      }
                  }
                  return filterResults;
  </code></pre>
  
  <p>and to get the only city name:</p>
  
  <pre><code>HttpURLConnection conn = null;
      StringBuilder jsonResults = new StringBuilder();
  
      try {
          StringBuilder sb = new StringBuilder(PLACES_API_BASE + TYPE_AUTOCOMPLETE + OUT_JSON);
          sb.append("?key=" + API_KEY);
          sb.append("&amp;types=(cities)");
          sb.append("&amp;input=" + URLEncoder.encode(input, "utf8"));
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/wVOEz.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>Thanks alot :)</p>