5
I am trying to mock location for use in another application, but this application is removing my Testprovider, making it not possible to mock the location.
How can I avoid this other app from removing my Testprovider?
The code that the other application is running to avoid mocking is:
private void BuscarLocalizacaoAtual(String provider, LocationListener locationListener) {
try {
this.locationManager.removeTestProvider(provider);
} catch (Exception e) {
}
this.locationManager.requestLocationUpdates(provider, time, 0.0f, locationListener);
}
*I would initially like to get around this problem through an apk. I know I could do this by editing the operating system.
100-dollar bill for anyone who helps me dribble this thing.
In the example you reported it uses lm.addTestProvider, the app code removes the test Provider by overriding the mock Location.
– Hoppy