public final class GeofenceHardwareRequest extends Object
Use this in conjunction with GeofenceHardware
APIs.
Constructor and Description |
---|
GeofenceHardwareRequest() |
Modifier and Type | Method and Description |
---|---|
static GeofenceHardwareRequest |
createCircularGeofence(double latitude,
double longitude,
double radius)
Create a circular geofence.
|
int |
getLastTransition()
Returns the last transition of this geofence.
|
double |
getLatitude()
Returns the latitude of this geofence.
|
double |
getLongitude()
Returns the longitude of this geofence.
|
int |
getMonitorTransitions()
Returns transitions monitored for this geofence.
|
int |
getNotificationResponsiveness()
Returns the notification responsiveness of this geofence.
|
double |
getRadius()
Returns the radius of this geofence.
|
int |
getSourceTechnologies()
Returns the source technologies to track this geofence.
|
int |
getUnknownTimer()
Returns the unknownTimer of this geofence.
|
void |
setLastTransition(int lastTransition)
Set the last known transition of the geofence.
|
void |
setMonitorTransitions(int monitorTransitions)
Set the transitions to be monitored.
|
void |
setNotificationResponsiveness(int notificationResponsiveness)
Set the notification responsiveness of the geofence.
|
void |
setSourceTechnologies(int sourceTechnologies)
Set the source technologies to use while tracking the geofence.
|
void |
setUnknownTimer(int unknownTimer)
Set the unknown timer for this geofence.
|
public static GeofenceHardwareRequest createCircularGeofence(double latitude, double longitude, double radius)
latitude
- Latitude of the geofencelongitude
- Longitude of the geofenceradius
- Radius of the geofence (in meters)public void setLastTransition(int lastTransition)
lastTransition
- The current state of the geofence. Can be one of
GeofenceHardware.GEOFENCE_ENTERED
, GeofenceHardware.GEOFENCE_EXITED
,
GeofenceHardware.GEOFENCE_UNCERTAIN
.public void setUnknownTimer(int unknownTimer)
unknownTimer
- The time limit after which the
GeofenceHardware.GEOFENCE_UNCERTAIN
transition
should be triggered. This paramter is defined in milliseconds.public void setMonitorTransitions(int monitorTransitions)
monitorTransitions
- Bitwise OR of GeofenceHardware.GEOFENCE_ENTERED
,
GeofenceHardware.GEOFENCE_EXITED
, GeofenceHardware.GEOFENCE_UNCERTAIN
public void setNotificationResponsiveness(int notificationResponsiveness)
notificationResponsiveness
- (milliseconds) Defines the best-effort description
of how soon should the callback be called when the transition
associated with the Geofence is triggered. For instance, if
set to 1000 millseconds with GeofenceHardware.GEOFENCE_ENTERED
,
the callback will be called 1000 milliseconds within entering
the geofence.public void setSourceTechnologies(int sourceTechnologies)
GeofenceHardware
.sourceTechnologies
- The set of source technologies to use.public double getLatitude()
public double getLongitude()
public double getRadius()
public int getMonitorTransitions()
public int getUnknownTimer()
public int getNotificationResponsiveness()
public int getLastTransition()
public int getSourceTechnologies()