startMonitoringGeofence()
Start monitoring a geofence region.
geofence
—(Required) AGeofence
object to monitor.
A Promise object that resolves as a string value. The value is a unique ID that’s assigned to the monitored geofence. If there’s an error, a rejected promise returns the error type of GeofenceServiceFailure
.
Use this function to start monitoring of a geofence.
Your callback function is called to return the ID of the geofence that’s been created. To stop monitoring the geofence in the future, retain the geofence ID.