Closed galadril closed 4 years ago
Is it possible to use multiple transition types? like:
return new Geofence( String.valueOf(id), latLng.latitude, latLng.longitude, radius, name, name, GEOFENCE_TRANSITION_ENTER | GEOFENCE_TRANSITION_DWELL | GEOFENCE_TRANSITION_EXIT);
And then check the transition type on the service:
private void handleEnterExit(Geofence geofence) { int transitionType = geofence.getTransitionType(); if (GEOFENCE_TRANSITION_ENTER == transitionType || GEOFENCE_TRANSITION_DWELL == transitionType) { Log.d(TAG, "Triggered enteringa geofence location: " + locationFound.getName()); } }
good idea!
actually I just wanted to implement that and it turns out it works already like this
Is it possible to use multiple transition types? like:
And then check the transition type on the service: