I'm working with geofences on android, it's all working fine on most phones, but on some of them, it's just not working (showing "geofences not available" in my error logs).
Some users don't have their location tracking enabled for Google Play Services. I think that is the reason why geofencing is not working on their phones. (right?)
Now I want a way to detect this. (inform the user and eventually show them how to fix it) I know there is a way to know wether google play services is available or not (and I already do this), but that doesn't say anything about the location services being enabled or not.
I know that I can check it while adding or removing geofence, there is an error code for it (geofence not available Location Status Codes), but that's not enough. Some users disable the location services after they added the geofences. Then I have no way of knowing this, and my app won't work. (complaining users etc.). At least I have to inform the user when they open the app to check what's wrong.
Does someone have an idea on how to do this? The best I can do now is adding and removing a dummy geofence on app boot, but there has to be a better way?
EDIT: I tested it with a device that had the issue, removing the app and reinstalling seems to fix the problem. I'm not doing anything special on the first boot, so this is really weird. It looks as if there is a problem with the google play services connection, and reinstalling the app does something special with these services. Is this possible? It gives no errors while connecting to them, but it did when I tried to set geofences (see above).