Search code examples
javaandroidgoogle-apiandroid-geofence

Google geofencing not working, always GEOFENCE_NOT_AVAILABLE


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.


Solution

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