GeofencingRequest

public classGeofencingRequestextendsObject
implementsParcelable

Specifies the list of geofences to be monitored and how the geofence notifications should be reported.

Refer to GeofencingClient.addGeofences(GeofencingRequest, android.app.PendingIntent)on how to monitor geofences.

Nested Class Summary

class GeofencingRequest.Builder A builder forGeofencingRequest.
@interface GeofencingRequest.InitialTrigger The triggering behavior at the moment when the geofences are added.

Constant Summary

int INITIAL_TRIGGER_DWELL A flag indicating that geofencing service should trigger Geofence.GEOFENCE_TRANSITION_DWELLnotification at the moment when the geofence is added and if the device is already inside that geofence for some time.
int INITIAL_TRIGGER_ENTER A flag indicating that geofencing service should trigger Geofence.GEOFENCE_TRANSITION_ENTERnotification at the moment when the geofence is added and if the device is already inside that geofence.
int INITIAL_TRIGGER_EXIT A flag indicating that geofencing service should trigger Geofence.GEOFENCE_TRANSITION_EXITnotification at the moment when the geofence is added and if the device is already outside that geofence.

Inherited Constant Summary

Field Summary

public static finalCreator<GeofencingRequest> CREATOR

Public Method Summary

List<Geofence>
getGeofences()
Gets the list of geofences to be monitored.
int
getInitialTrigger()
Gets the triggering behavior at the moment when the geofences are added.
String
void
writeToParcel(Parceldest, int flags)

Inherited Method Summary

Constants

public static final int INITIAL_TRIGGER_DWELL

A flag indicating that geofencing service should trigger Geofence.GEOFENCE_TRANSITION_DWELLnotification at the moment when the geofence is added and if the device is already inside that geofence for some time.

Constant Value:4

public static final int INITIAL_TRIGGER_ENTER

A flag indicating that geofencing service should trigger Geofence.GEOFENCE_TRANSITION_ENTERnotification at the moment when the geofence is added and if the device is already inside that geofence.

Constant Value:1

public static final int INITIAL_TRIGGER_EXIT

A flag indicating that geofencing service should trigger Geofence.GEOFENCE_TRANSITION_EXITnotification at the moment when the geofence is added and if the device is already outside that geofence.

Constant Value:2

Fields

public static finalCreator<GeofencingRequest> CREATOR

Public Methods

publicList<Geofence> getGeofences()

Gets the list of geofences to be monitored.

Returns
  • the list of geofences to be monitored

public intgetInitialTrigger()

Gets the triggering behavior at the moment when the geofences are added.

Returns

publicStringtoString()

public voidwriteToParcel(Parceldest, int flags)