title: Android Mock location don't work with google maps
body: <p>I created an Android application that mock the gps location, its works great with most of the programs like igo, waze, osmAnd, GPS status and more, but not with google maps that still show the actual position I'm on.</p>
  
  <p>I disabled the gps and network location as well.</p>
  
  <p>Any ideas why is it? how to solve it? Thanks </p>
  
  <p>The code I use:</p>
  
  <pre><code>public void setLocation(double latitude, double longitude, double altitude, float bearing, float speed){
      String PROVIDER_NAME = LocationManager.GPS_PROVIDER;
      locationManager.addTestProvider(PROVIDER_NAME, false, false, false, false, true, true, true, Criteria.POWER_LOW, Criteria.ACCURACY_FINE);
  
      locationManager.setTestProviderEnabled(PROVIDER_NAME, true);
      locationManager.setTestProviderStatus(PROVIDER_NAME, LocationProvider.AVAILABLE, null, System.currentTimeMillis());
  
      Location location = new Location(PROVIDER_NAME);
      location.setLatitude(latitude);
      location.setLongitude(longitude);
      location.setAltitude(altitude);
      location.setBearing(bearing);
      location.setSpeed(speed);   
      location.setTime(System.currentTimeMillis());
      locationManager.setTestProviderLocation(PROVIDER_NAME, location.getLocation());
  }
  </code></pre>