I am creating an app that uses Geofence monitoring, I have successfully implemented this functionality but have encountered an issue while testing it with the "Device Only" location setting which uses GPS by itself.
I can get location data with Device only but when I try to add geofences to monitor it always returns status code 1000 which is GEOFENCE_NOT_AVAILABLE.
This code below to addGeofences is called after I have confirmed Location permissions
LocationServices.GeofencingApi.addGeofences(mApiClient, getGeofencingRequest(),
mGeofenceRequestIntent).setResultCallback(new ResultCallback<Status>() {
@Override
public void onResult(@NonNull Status status) {
if(!status.isSuccess()) {
Toast.makeText(mContext, String.format("Monitor Geofences %s", status.getStatusCode()), Toast.LENGTH_LONG).show();
}
else{
Toast.makeText(mContext, String.format("Successfully Monitor Geofences %s", status.getStatusCode()), Toast.LENGTH_LONG).show();
}
}
});
Am I doing something wrong or is my only option to force the user to use the Battery saving of High accuracy location modes?