Methods Summary |
---|
public static android.hardware.location.GeofenceHardwareRequest | createCircularGeofence(double latitude, double longitude, double radius)Create a circular geofence.
GeofenceHardwareRequest geofenceRequest = new GeofenceHardwareRequest();
geofenceRequest.setCircularGeofence(latitude, longitude, radius);
return geofenceRequest;
|
public int | getLastTransition()Returns the last transition of this geofence.
return mLastTransition;
|
public double | getLatitude()Returns the latitude of this geofence.
return mLatitude;
|
public double | getLongitude()Returns the longitude of this geofence.
return mLongitude;
|
public int | getMonitorTransitions()Returns transitions monitored for this geofence.
return mMonitorTransitions;
|
public int | getNotificationResponsiveness()Returns the notification responsiveness of this geofence.
return mNotificationResponsiveness;
|
public double | getRadius()Returns the radius of this geofence.
return mRadius;
|
public int | getSourceTechnologies()Returns the source technologies to track this geofence.
return mSourceTechnologies;
|
int | getType()
return mType;
|
public int | getUnknownTimer()Returns the unknownTimer of this geofence.
return mUnknownTimer;
|
private void | setCircularGeofence(double latitude, double longitude, double radius)
mLatitude = latitude;
mLongitude = longitude;
mRadius = radius;
mType = GEOFENCE_TYPE_CIRCLE;
|
public void | setLastTransition(int lastTransition)Set the last known transition of the geofence.
mLastTransition = lastTransition;
|
public void | setMonitorTransitions(int monitorTransitions)Set the transitions to be monitored.
mMonitorTransitions = monitorTransitions;
|
public void | setNotificationResponsiveness(int notificationResponsiveness)Set the notification responsiveness of the geofence.
mNotificationResponsiveness = notificationResponsiveness;
|
public void | setSourceTechnologies(int sourceTechnologies)Set the source technologies to use while tracking the geofence.
The value is the bit-wise of one or several source fields defined in
{@link GeofenceHardware}.
int sourceTechnologiesAll = GeofenceHardware.SOURCE_TECHNOLOGY_GNSS
| GeofenceHardware.SOURCE_TECHNOLOGY_WIFI
| GeofenceHardware.SOURCE_TECHNOLOGY_SENSORS
| GeofenceHardware.SOURCE_TECHNOLOGY_CELL
| GeofenceHardware.SOURCE_TECHNOLOGY_BLUETOOTH;
int sanitizedSourceTechnologies = (sourceTechnologies & sourceTechnologiesAll);
if (sanitizedSourceTechnologies == 0) {
throw new IllegalArgumentException("At least one valid source technology must be set.");
}
mSourceTechnologies = sanitizedSourceTechnologies;
|
public void | setUnknownTimer(int unknownTimer)Set the unknown timer for this geofence.
mUnknownTimer = unknownTimer;
|