Currently, I'm developing an application that injects locations into 
Android. This application should inject locations at specific moments. 
Before and after, normal GPS should be used.

My software is able to switch to mock locations and inject locations 
succesfully. But I am not able to make Android listen to normal GPS again.

My code to set-up:

mLocationManager = (LocationManager) 
getSystemService(Context.LOCATION_SERVICE);
mLocationManager.addTestProvider(LocationManager.GPS_PROVIDER, false, 
false, false, false, true, true, true, 0, /*magic*/5);
mLocationManager.setTestProviderEnabled(LocationManager.GPS_PROVIDER, true);

My failing attempt to stop:

mLocationManager.setTestProviderEnabled(PROVIDER_NAME, false);
mLocationManager.removeTestProvider(PROVIDER_NAME);

My question: how to stop provide mock locations and resume default Android 
GPS?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to