In my method for building a geofence, I am getting an error on ExpirationDuration(NEVER_EXPIRE)
and setTransitionTypes(GEOFENCE_TRANSITION_ENTER)
stating that they can't be resolved to a variable. Why is this happening?
My method:
private void buildGeofence(){
LatLng geofencePoint = marker.getPosition();
int radius = 1610;
Geofence.Builder geofence = new Geofence.Builder();
geofence.setCircularRegion(geofencePoint.latitude,geofencePoint.longitude, radius);
geofence.setExpirationDuration(NEVER_EXPIRE);
geofence.setTransitionTypes(GEOFENCE_TRANSITION_ENTER);
geofence.setNotificationResponsiveness(0);
geofence.build();
}