Skip to content

Instantly share code, notes, and snippets.

@FilHazer FilHazer/Geo.java Secret
Created Jan 22, 2016

Embed
What would you like to do?
public class Geo {
public String id;
public String name;
public double latitude;
public double longitude;
public int radius;
public Geofence geofence() {
id = UUID.randomUUID().toString();
return new Geofence.Builder()
.setRequestId(id)
.setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER | Geofence.GEOFENCE_TRANSITION_EXIT | Geofence.GEOFENCE_TRANSITION_DWELL)
.setLoiteringDelay(1000)
.setCircularRegion(latitude, longitude, radius)
.setExpirationDuration(Geofence.NEVER_EXPIRE)
.build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.