Thursday, 8 August 2013

LocationClient setMockMode and setMockLocation are not defined?

LocationClient setMockMode and setMockLocation are not defined?

Been playing with android geofences but testing is becoming an issue. I
need to mock the device location in order to trigger the enter/leave
events but so far I am unable to find a way to do this.
In the documentation of the LocationClient there are two methods that seem
to do what I need:
setMockLocation
setMockMode
but I cannot compile any project with those methods as the compiler
complains these symbols do not exists:
SujGeoService2.java:296: error: cannot find symbol
mLocClient.setMockMode(true);
^
symbol: method setMockMode(boolean)
location: variable mLocClient of type LocationClient

1 comment:

  1. Update to latest google-play-services (revision 12 now) from the Android SDK Manager and it will works fine.

    REF: http://stackoverflow.com/questions/18138955/locationclient-setmockmode-and-setmocklocation-are-not-defined

    ReplyDelete