public class GeofenceState extends Object
Modifier and Type | Field and Description |
---|---|
static int |
FLAG_ENTER |
static int |
FLAG_EXIT |
int |
mAllowedResolutionLevel |
long |
mExpireAt |
Geofence |
mFence |
PendingIntent |
mIntent |
String |
mPackageName |
int |
mUid |
Constructor and Description |
---|
GeofenceState(Geofence fence,
long expireAt,
int allowedResolutionLevel,
int uid,
String packageName,
PendingIntent intent) |
Modifier and Type | Method and Description |
---|---|
double |
getDistanceToBoundary()
Gets the distance from the current location to the fence's boundary.
|
int |
processLocation(Location location)
Process a new location.
|
String |
toString()
Returns a string representation of the object.
|
public static final int FLAG_ENTER
public static final int FLAG_EXIT
public final Geofence mFence
public final long mExpireAt
public final int mAllowedResolutionLevel
public final int mUid
public final String mPackageName
public final PendingIntent mIntent
public GeofenceState(Geofence fence, long expireAt, int allowedResolutionLevel, int uid, String packageName, PendingIntent intent)
public int processLocation(Location location)
public double getDistanceToBoundary()
Double.MAX_VALUE
if unknown.public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())