public class GeofencingApiImpl extends java.lang.Object implements GeofencingApi
GeofencingApi.EXTRA_GEOFENCE_LIST, EXTRA_TRANSITION, EXTRA_TRIGGERING_LOCATION| Constructor and Description |
|---|
GeofencingApiImpl(IntentFactory geofenceFactory,
IntentFactory dwellFactory,
IdGenerator generator) |
| Modifier and Type | Method and Description |
|---|---|
PendingResult<Status> |
addGeofences(LostApiClient client,
GeofencingRequest geofencingRequest,
android.app.PendingIntent pendingIntent)
Sets
PendingIntent to be notified when the device enters or exits one of the specified
geofences. |
PendingResult<Status> |
addGeofences(LostApiClient client,
java.util.List<Geofence> geofences,
android.app.PendingIntent pendingIntent) |
void |
connect(android.content.Context context) |
void |
disconnect() |
void |
geofenceEntered(Geofence geofence,
int pendingIntentId) |
void |
geofenceExited(Geofence geofence) |
Geofence |
geofenceForIntentId(int intentId) |
boolean |
isConnected() |
android.app.PendingIntent |
pendingIntentForIntentId(int intentId) |
PendingResult<Status> |
removeGeofences(LostApiClient client,
java.util.List<java.lang.String> geofenceRequestIds)
Removes geofences for a given list of request ids
|
PendingResult<Status> |
removeGeofences(LostApiClient client,
android.app.PendingIntent pendingIntent)
Removes geofences for a given
PendingIntent |
public GeofencingApiImpl(IntentFactory geofenceFactory, IntentFactory dwellFactory, IdGenerator generator)
public void connect(android.content.Context context)
public boolean isConnected()
public void disconnect()
public PendingResult<Status> addGeofences(LostApiClient client, GeofencingRequest geofencingRequest, android.app.PendingIntent pendingIntent) throws java.lang.SecurityException
GeofencingApiPendingIntent to be notified when the device enters or exits one of the specified
geofences.addGeofences in interface GeofencingApiclient - Connected client to receive geofence updates for.geofencingRequest - Request containing geofences to receive updates for.pendingIntent - Intent to be notified when geofences are entered/exited.java.lang.SecurityExceptionpublic PendingResult<Status> addGeofences(LostApiClient client, java.util.List<Geofence> geofences, android.app.PendingIntent pendingIntent) throws java.lang.SecurityException
addGeofences in interface GeofencingApiclient - Connected client to receive geofence updates for.geofences - Geofences to receive updates for.pendingIntent - Intent to be notified when geofences are entered/exited.java.lang.SecurityExceptionpublic PendingResult<Status> removeGeofences(LostApiClient client, java.util.List<java.lang.String> geofenceRequestIds)
GeofencingApiremoveGeofences in interface GeofencingApiclient - Connected client to remove geofence updates for.geofenceRequestIds - Geofence ids to remove updates for.public PendingResult<Status> removeGeofences(LostApiClient client, android.app.PendingIntent pendingIntent) throws java.lang.SecurityException
GeofencingApiPendingIntentremoveGeofences in interface GeofencingApiclient - Connected client to remove geofence updates for.pendingIntent - Intent to remove updates for.java.lang.SecurityExceptionpublic android.app.PendingIntent pendingIntentForIntentId(int intentId)
public Geofence geofenceForIntentId(int intentId)
public void geofenceEntered(Geofence geofence, int pendingIntentId)
public void geofenceExited(Geofence geofence)