Package com.indooratlas.android.sdk
Class IAGeofenceEvent
- java.lang.Object
-
- com.indooratlas.android.sdk.IAGeofenceEvent
-
- All Implemented Interfaces:
Parcelable
public class IAGeofenceEvent extends Object implements Parcelable
A class describing a geofence event. Includes the event type, triggering location and the list of geofences that that have triggered with the type on the specific location.
-
-
Nested Class Summary
-
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 Parcelable.Creator<IAGeofenceEvent>
CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Constructor Description IAGeofenceEvent(Parcel in)
IAGeofenceEvent(ArrayList<IAGeofence> geofences, int transitionType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
describeContents()
boolean
equals(Object o)
static IAGeofenceEvent
from(Intent intent)
Extracts anIAGeofenceEvent
from the extras of anIntent
ornull
if not present.int
getGeofenceTransition()
Get the type of geofence event.ArrayList<IAGeofence>
getTriggeringGeofences()
Get the list ofgeofences
in thisIAGeofenceEvent
.int
hashCode()
String
toString()
void
writeToParcel(Parcel dest, int flags)
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<IAGeofenceEvent> CREATOR
-
-
Constructor Detail
-
IAGeofenceEvent
public IAGeofenceEvent(@NonNull ArrayList<IAGeofence> geofences, int transitionType)
-
IAGeofenceEvent
public IAGeofenceEvent(Parcel in)
-
-
Method Detail
-
getGeofenceTransition
public int getGeofenceTransition()
- Returns:
- The transition type in this geofence event
- See Also:
IAGeofence.GEOFENCE_TRANSITION_ENTER
,IAGeofence.GEOFENCE_TRANSITION_EXIT
-
getTriggeringGeofences
public ArrayList<IAGeofence> getTriggeringGeofences()
Get the list ofgeofences
in thisIAGeofenceEvent
.- Returns:
- List of geofences that were triggered.
-
writeToParcel
public void writeToParcel(Parcel dest, int flags)
- Specified by:
writeToParcel
in interfaceParcelable
-
describeContents
public int describeContents()
- Specified by:
describeContents
in interfaceParcelable
-
from
public static IAGeofenceEvent from(Intent intent)
Extracts anIAGeofenceEvent
from the extras of anIntent
ornull
if not present. Use this utility method for received Intents after requesting geofence events withIALocationManager.addGeofences(IAGeofenceRequest,PendingIntent)
. The location is stored in the extraBundle
abyte array
with theIALocationManager.EXTRA_GEOFENCE_EVENT
key.- Parameters:
intent
-Intent
to extract theIAGeofenceEvent
from. Can be null.- Returns:
- an
IAGeofenceEvent
ornull
-
-