public abstract class GeofenceHardwareCallback extends Object
GeofenceHardware
Constructor and Description |
---|
GeofenceHardwareCallback() |
Modifier and Type | Method and Description |
---|---|
void |
onGeofenceAdd(int geofenceId,
int status)
The callback called to notify the success or failure of the add call.
|
void |
onGeofencePause(int geofenceId,
int status)
The callback called to notify the success or failure of the pause call.
|
void |
onGeofenceRemove(int geofenceId,
int status)
The callback called to notify the success or failure of the remove call.
|
void |
onGeofenceResume(int geofenceId,
int status)
The callback called to notify the success or failure of the resume call.
|
void |
onGeofenceTransition(int geofenceId,
int transition,
Location location,
long timestamp,
int monitoringType)
The callback called when there is a transition to report for the specific
geofence.
|
public void onGeofenceTransition(int geofenceId, int transition, Location location, long timestamp, int monitoringType)
geofenceId
- The geofence ID of the geofencetransition
- One of GeofenceHardware.GEOFENCE_ENTERED
,
GeofenceHardware.GEOFENCE_EXITED
, GeofenceHardware.GEOFENCE_UNCERTAIN
location
- The last known location according to the monitoring system.timestamp
- The timestamp (elapsed real time in milliseconds) when the transition was
detectedmonitoringType
- Type of the monitoring system.public void onGeofenceAdd(int geofenceId, int status)
geofenceId
- The ID of the geofence.status
- One of GeofenceHardware.GEOFENCE_SUCCESS
,
GeofenceHardware.GEOFENCE_ERROR_ID_EXISTS
,
GeofenceHardware.GEOFENCE_ERROR_INVALID_TRANSITION
,
GeofenceHardware.GEOFENCE_ERROR_TOO_MANY_GEOFENCES
,
GeofenceHardware.GEOFENCE_FAILURE
public void onGeofenceRemove(int geofenceId, int status)
geofenceId
- The ID of the geofence.status
- One of GeofenceHardware.GEOFENCE_SUCCESS
,
GeofenceHardware.GEOFENCE_ERROR_ID_UNKNOWN
,
GeofenceHardware.GEOFENCE_FAILURE
public void onGeofencePause(int geofenceId, int status)
geofenceId
- The ID of the geofence.status
- One of GeofenceHardware.GEOFENCE_SUCCESS
,
GeofenceHardware.GEOFENCE_ERROR_ID_UNKNOWN
,
GeofenceHardware.GEOFENCE_FAILURE
public void onGeofenceResume(int geofenceId, int status)
geofenceId
- The ID of the geofence.status
- One of GeofenceHardware.GEOFENCE_SUCCESS
,
GeofenceHardware.GEOFENCE_ERROR_ID_UNKNOWN
,
GeofenceHardware.GEOFENCE_ERROR_INVALID_TRANSITION
,
GeofenceHardware.GEOFENCE_FAILURE