I am creating an application that includes googles geology that I created with the ENTER and EXIT transitions . The problem arises when the " Location " is turned on , when inside my geolocation there is a merger of both transitions, when only the ENTER transition should start. Ive installed both ENTER and EXIT as intitialTrigger().
How is this possible?
This is a bug in the google api or I did something wrong in the builder. Thanks in advance.
@Override
public void onResult(Result result) {
Status s = result.getStatus();
Log.d(TAG, "onResult(...)" + s.isSuccess());
if (!s.isSuccess()) {
Log.d(TAG, "statuskode = " + s.getStatusCode() +
" noget gik galt, sandsynlighvis blev gps slået fra = statuscode 1000");
}
}
private GeofencingRequest createGeoFences() {
return new GeofencingRequest.Builder()
.addGeofence(geoFenceBuilder(Constants.LOCATION_BALLERUP, "ballerup_req_id"))
.addGeofence(geoFenceBuilder(Constants.LOCATION_AALBORG, "aalborg_req_id"))
.addGeofence(geoFenceBuilder(Constants.LOCATION_ESBJERG, "esbjerg_req_id"))
.addGeofence(geoFenceBuilder(Constants.LOCATION_ÅRHUS, "århus_req_id"))
.setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER | GeofencingRequest.INITIAL_TRIGGER_EXIT)
.build();
}
private Geofence geoFenceBuilder(LatLng location, String requestId) {
return new Geofence.Builder().setCircularRegion(location.latitude, location.longitude, TARGET_RADIUS)
.setExpirationDuration(Geofence.NEVER_EXPIRE)
.setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER | Geofence.GEOFENCE_TRANSITION_EXIT)
.setRequestId(requestId)
.setNotificationResponsiveness(NOTIFICATION_DELAY)
.build();
}
source
share