smart-location-lib
smart-location-lib copied to clipboard
Geofincing doesn't work
Hello, guys. I know that about geofencing was many issues but i really don't know, what to do. They are not working. I write as in example:
// point
GeofenceModel gfm = new GeofenceModel.Builder("dwellGarage")
.setTransition(Geofence.GEOFENCE_TRANSITION_ENTER)
.setLatitude(49.4584119)
.setLongitude(32.0338578)
.setRadius(500)
.build();
// try to catch onGeofenceTransition but I do not get here
mSmartLocation.geofencing().add(gfm).start(new OnGeofencingTransitionListener() {
@Override
public void onGeofenceTransition(TransitionGeofence transitionGeofence) {
Log.wtf("GEOFENCE", "we are here");
}
});
Maybe this part of the library work in the old version and can I use it?
I am having the same issue.
GeofenceModel homeFence = new GeofenceModel.Builder(SettingsActivity.FENCE_HOMELOCATION)
.setTransition(Geofence.GEOFENCE_TRANSITION_ENTER | Geofence.GEOFENCE_TRANSITION_EXIT |Geofence.GEOFENCE_TRANSITION_DWELL)
.setLatitude(48.341786)
.setLongitude(10.905211)
.setRadius(100)
.build();
SmartLocation.with(this).geofencing()
.add(homeFence)
.start(new OnGeofencingTransitionListener() {
@Override
public void onGeofenceTransition(TransitionGeofence transitionGeofence)
{
MyLogger.d(TAG, "Geofence Transition:" + transitionGeofence.getTransitionType());
}
});
I'm not getting any Log output when moving around.
Any Update ?
@mrmans0n I have the same issue. Any suggestions on this issue? It seems GeofencingService not triggered
AndroidManifest.xml