Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- geofenceList!!.add(Geofence.Builder()
- // Set the request ID of the geofence. This is a string to identify this
- // geofence.
- .setRequestId(entry.key)
- .setLoiteringDelay(30000)
- // Set the circular region of this geofence.
- .setCircularRegion(
- entry.value.latLng!!.latitude,
- entry.value.latLng!!.longitude,
- entry.value.radius!!
- )
- // Set the expiration duration of the geofence. This geofence gets automatically
- // removed after this period of time.
- .setExpirationDuration(1800000)
- // Set the transition types of interest. Alerts are only generated for these
- // transition. We track entry and exit transitions in this sample.
- .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER or Geofence.GEOFENCE_TRANSITION_EXIT or Geofence.GEOFENCE_TRANSITION_DWELL)
- // Create the geofence.
- .build())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement