| java.lang.Object | |
| ↳ | com.steerpath.sdk.geofence.Geofence.Builder |
Used for configuring and instantiating Geofence objects.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Builder() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Geofence.Builder |
addBeacon(String beaconIdentifier, int rssi1m, float radius)
Defines that this geofence is actually a beaconfence.
| ||||||||||
| Geofence.Builder |
addPolygon(JSONObject geojson)
Easily turn a GeoJSON object to a geofence.
| ||||||||||
| Geofence.Builder |
addPolygonRegionExterior(double[][] lat_lon_pairs)
Defines that this geofence is a polygonal region with the exterior area defined by
the parameters.
| ||||||||||
| Geofence.Builder |
addPolygonRegionHole(double[][] lat_lon_pairs)
Defines a hole in this polygon.
| ||||||||||
| Geofence |
build()
Instantiate a Geofence with the previously provided settings.
| ||||||||||
| Geofence.Builder |
setCircularRegion(double latitude, double longitude, float radius)
Defines that this geofence is a circular region with a center point at the given
coordinate and a radius of the set radius.
| ||||||||||
| Geofence.Builder |
setExpirationDuration(long durationMillis)
This geofence will disappear after this time has elapsed.
| ||||||||||
| Geofence.Builder |
setInfo(String info)
Defines additional user specified information tied to this geofence.
| ||||||||||
| Geofence.Builder |
setLevelIndex(int levelIndex)
Set's the floor or level index on which this geofence should operate.
| ||||||||||
| Geofence.Builder |
setLoiteringDelay(int loiteringDelayMs)
The time before a "dwelled" transition occurs after entry.
| ||||||||||
| Geofence.Builder |
setNotificationResponsiveness(int notificationResponsivenessMs)
Currently not implemented.
| ||||||||||
| Geofence.Builder |
setRequestId(String requestId)
The identifier for this geofence.
| ||||||||||
| Geofence.Builder |
setTransitionTypes(int transitionTypes)
Which transitions are notified.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Defines that this geofence is actually a beaconfence. ENTER and EXIT events are triggered when user reaches vicinity of the beacon. This means that physical beacon is required for testing the beaconfence. DWELL events are not valid for beaconfence.
| beaconIdentifier | for example "u:af774f3518299426a456:00000000xxyy" |
|---|---|
| rssi1m | you may obtain this value from Steerpath Meta. Otherwise you may use recommended default value which is -55. |
| radius | in meters |
Easily turn a GeoJSON object to a geofence. Supports Polygons and MultiPolygons which can be inside Features, FeatureCollections and GeometryCollections. Holes in polygons are supported.
| geojson | The geojson object to add as a geofence. |
|---|
| JSONException | if the JSON isn't a valid GeoJSON or if the GeoJSON contains unsupported types. |
|---|
Defines that this geofence is a polygonal region with the exterior area defined by the parameters.
Defines a hole in this polygon.
Instantiate a Geofence with the previously provided settings.
Defines that this geofence is a circular region with a center point at the given coordinate and a radius of the set radius.
| latitude | of the center of this geofence |
|---|---|
| longitude | of the center point of this geofence |
| radius | in meters |
This geofence will disappear after this time has elapsed. Zero means the next time the geofencing api is initialized, -1 means never (including surviving reboot).
Defines additional user specified information tied to this geofence.
| info | metadata to associate with this geofence. |
|---|
Set's the floor or level index on which this geofence should operate.
| levelIndex | the level index for this geofence (default = 0) |
|---|
The time before a "dwelled" transition occurs after entry. Not valid with beacon fences.
Currently not implemented.
The identifier for this geofence. If none is set, a UUID will be generated.
Which transitions are notified.
| transitionTypes | default are ENTRY and EXIT |
|---|