Is it possible to mock locations with Google’s new smooth access provider?

Is it possible for applications such as FakeGPS to work with the new smooth access provider (Google Play Services)?

I believe this is a problem:

09-20 17:18:41.842 21753-21809/? W/LocationManager﹕ java.lang.IllegalArgumentException: Incomplete location object, missing timestamp or accuracy? Location[gps 32.899542,-100.165065 acc=1 et=?!? alt=65.0] at android.location.LocationManager.setTestProviderLocation(LocationManager.java:1218) at com.lexa.fakegps.FakeGPSProvider.run(FakeGPSProvider.java:75) 
+4
source share
1 answer

The Fused Location Provider can only use mock locations provided by setMockMode () and setMockLocation (). The call to android.location.LocationManager.setTestProviderLocation () does not affect the locations created by the Fused Location provider.

Although FakeGPS won't do anything for the Fused Location provider, the new Android tutorial for Mock Locations: Testing with Mock Locations includes an example application that enters false locations into the Fused Location Provider.

+6
source

All Articles