GeofencingRequest | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Analyze
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Nested Classes | Constants | Inherited Constants | Fields | Methods | Inherited Methods | [Expand All]
public class

# GeofencingRequest

extends Object
implements Parcelable

java.lang.Object
↳ | com.google.android.gms.location.GeofencingRequest

## Class Overview

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

Refer to `addGeofences(com.google.android.gms.common.api.GoogleApiClient, GeofencingRequest, android.app.PendingIntent)` on how to monitor geofences.

## Summary

Nested Classes
class | GeofencingRequest.Builder | A builder that builds `GeofencingRequest`.

Constants
int | INITIAL_TRIGGER_DWELL | A flag indicating that geofencing service should trigger `GEOFENCE_TRANSITION_DWELL` notification 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_TRANSITION_ENTER` notification 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_TRANSITION_EXIT` notification at the moment when the geofence is added and if the device is already outside that geofence.

[Expand] Inherited Constants
From interface android.os.Parcelable
int | CONTENTS_FILE_DESCRIPTOR |
int | PARCELABLE_WRITE_RETURN_VALUE |

Fields
public static final Creator<GeofencingRequest> | CREATOR |

Public Methods
int | describeContents()
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.
int | getVersionCode()
void | writeToParcel(Parcel dest, int flags)

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
From interface android.os.Parcelable
abstract int | describeContents()
abstract void | writeToParcel(Parcel arg0, int arg1)

## Constants

#### public static final int INITIAL_TRIGGER_DWELL

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

Constant Value: 4 (0x00000004)

#### public static final int INITIAL_TRIGGER_ENTER

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

Constant Value: 1 (0x00000001)

#### public static final int INITIAL_TRIGGER_EXIT

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

Constant Value: 2 (0x00000002)

## Fields

#### public static final Creator<GeofencingRequest> CREATOR

## Public Methods

#### public int describeContents ()

#### public List<Geofence> getGeofences ()

Gets the list of geofences to be monitored.

##### Returns

- the list of geofences to be monitored

#### public int getInitialTrigger ()

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

##### Returns

- the triggering behavior at the moment when the geofences are added. Its a bit-wise of `INITIAL_TRIGGER_ENTER` and `INITIAL_TRIGGER_EXIT`.

#### public int getVersionCode ()

#### public void writeToParcel (Parcel dest, int flags)