2

I'm trying so many days using the Google Location API for define geofences in the map, i use the Smart Location Library togheter with genymotion and Lockito for test my geofences but at the time at i start the lockito test my IntentService catchs the google geofencing event with an error code of 1000 and in the Google APIs for Android docs this means a GEOFENCE_NOT_AVAILABLE error, i do the tests using genymotion and my Moto G3 but the results are the same, then i try to test proyects from github and the rusults are also the same, i ensure that in my devices the GPS is on and in the best accuracy; i try with the following projects and nothing changes the error:

Extra data: tests were done in phones with android 6.0, i do the tests with Google services 9.6.1 and 9.4.0 and the results vary.

  • just use [this](http://stackoverflow.com/a/27169357/7163567) You get GEOFENCE_NOT_AVAILABLE (code '1000') when user disagrees to "Use Google' location services" in Settings->Location->Mode worked for me! – khoshrang Dec 27 '16 at 03:23

2 Answers2

0

I have tried using the Genymotion emulator and had a similar GEOFENCE_NOT_AVAILABLE error. The reason, in my particular case, was that Google Play Services was not installed on the emulator.

Simon Hutton
  • 1,677
  • 3
  • 22
  • 35
0

The real problem was using Lockito, you must test other apps for simulate locations in genymotion or real devices.