Package com.indooratlas.android.sdk
Interface IAGeofence
-
- All Superinterfaces:
Parcelable
public interface IAGeofence extends Parcelable
A data object representing a geofence defined by a set of vertices
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IAGeofence.Builder
Builder to configureIAGeofence
.-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static int
GEOFENCE_TRANSITION_ENTER
Geofence enter event.static int
GEOFENCE_TRANSITION_EXIT
Geofence exit event.-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ArrayList<double[]>
getEdges()
Return the list of vertices, as (latitude, longitude), pairs of this polygon.Integer
getFloor()
Return theint
floor number for this geofence if set,null
otherwise.String
getId()
Return the identification key for this geofence.double
getMaxLatitude()
Return the maximum latitude of the geofence indouble
.double
getMaxLongitude()
Return the maximum longitude of the geofence indouble
.double
getMinLatitude()
Return the minimum latitude of the geofence indouble
.double
getMinLongitude()
Return the minimum longitude of the geofence indouble
.String
getName()
Return a human-readable name of the geofence.JSONObject
getPayload()
Return theJSONObject
payload for this geofence.boolean
hasFloor()
Check whether the floor number has been set for this geofence.boolean
hasPayload()
Check whether the payload is empty in this geofence.boolean
isCloudGeofence()
boolean
isIncluded(double latitude, double longitude, Integer floor)
Check whether a WGS84 coordinate (latitude & longitude) in specific floor is included in thisgeofence
.IAGeofence.Builder
newBuilder()
-
Methods inherited from interface android.os.Parcelable
describeContents, writeToParcel
-
-
-
-
Field Detail
-
GEOFENCE_TRANSITION_ENTER
static final int GEOFENCE_TRANSITION_ENTER
Geofence enter event. Enter event is triggered when entering a geofence.- See Also:
- Constant Field Values
-
GEOFENCE_TRANSITION_EXIT
static final int GEOFENCE_TRANSITION_EXIT
Geofence exit event. Exit event is triggered when exiting a geofence.- See Also:
- Constant Field Values
-
-
Method Detail
-
newBuilder
IAGeofence.Builder newBuilder()
- Returns:
IAGeofence.Builder
pre-populated with values from thisIAGeofence
.
-
isIncluded
boolean isIncluded(double latitude, double longitude, Integer floor)
Check whether a WGS84 coordinate (latitude & longitude) in specific floor is included in thisgeofence
.- Parameters:
latitude
- WGS84 coordinate latitude.longitude
- WGS84 coordinate longitude.floor
- Floor number of the position to be checked. Ifnull
, position can only be in the geofence if the geofence does not have floor number either.
-
getId
String getId()
Return the identification key for this geofence.
-
getName
String getName()
Return a human-readable name of the geofence. Empty string if not specified
-
getPayload
JSONObject getPayload() throws IllegalArgumentException
Return theJSONObject
payload for this geofence.- Throws:
IllegalArgumentException
-
getFloor
Integer getFloor()
Return theint
floor number for this geofence if set,null
otherwise.
-
hasFloor
boolean hasFloor()
Check whether the floor number has been set for this geofence.- See Also:
getFloor()
-
hasPayload
boolean hasPayload()
Check whether the payload is empty in this geofence.- See Also:
getPayload()
-
isCloudGeofence
boolean isCloudGeofence()
- Returns:
- is this geofence cloud-defined (static) or run-time defined (dynamic)
-
getEdges
ArrayList<double[]> getEdges()
Return the list of vertices, as (latitude, longitude), pairs of this polygon. The edges are defined as the line segment between the consecutive points in the list and the line segment between the last and first points in the list (i.e., the first point is not stored twice).- Returns:
- List of 2D doubles of defining the vertices of this polygon
-
getMaxLongitude
double getMaxLongitude()
Return the maximum longitude of the geofence indouble
.
-
getMinLongitude
double getMinLongitude()
Return the minimum longitude of the geofence indouble
.
-
getMaxLatitude
double getMaxLatitude()
Return the maximum latitude of the geofence indouble
.
-
getMinLatitude
double getMinLatitude()
Return the minimum latitude of the geofence indouble
.
-
-