title: Different results between Android Geocoder and Google Geocoding web service
body: <p>I am creating an Android application and I need to use the geolocation. </p>
  
  <p>I have started by using the Geocoder API from Android (<strong>android.location.geocoder</strong>) but it causes some issues (<em>timed out waiting for response from server</em>) which seems to be common according to what I have read.</p>
  
  <p>To make my application work when this kind of error occurs, I use the <strong>Geocoding web service</strong>.</p>
  
  <p>Now, the application works every time. The problem is that the results returned by the geocoder from API and the geocoder from the web service are not the same.</p>
  
  <p>For example the web service returns only 3 addresses with only city name and country whereas the geocoding from the API returns about 8 addresses with the feature name, the thoroughfare, the locality...</p>
  
  <p>The question is: is there a way to make the results from the web service exactly the same than the ones from the API?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here is my MainGeocoder class:</p>
  
  <pre><code>public class MainGeocoder {
  
      private Geocoder geocoderAPI;
      private GeocoderRest geocoderRest;
  
      public MainGeocoder(Context context) {
          geocoderAPI = new Geocoder(context);
          geocoderRest = new GeocoderRest(context);
      }
  
      public List&lt;Address&gt; getFromLocationName(String search, int maxResults) {
          List&lt;Address&gt; addresses;
          try {
              addresses = geocoderAPI.getFromLocationName(search, maxResults);
              return addresses;
          } catch (IOException e) {
              e.printStackTrace();
              try {
                  addresses = geocoderRest.getFromLocationName(search, maxResults);
                  return addresses;
              } catch (IOException e1) {
                  return null;
              } catch (LimitExceededException e1) {
                  return null;
              }
          }
      }
  }
  </code></pre>
  
  <p>It basically tries to get the list of addresses from the API Geocoder. If an IO exception is thrown it gets this list from the web service by using the GeocoderRest class which has been pasted from here: <a href="https://stackoverflow.com/a/15117087/3571822">https://stackoverflow.com/a/15117087/3571822</a></p>