The core component of Navmii SDK responsible for geofencing is GeofenceManager. This class provides an API for managing user geofences and transition event notifications.
...
CREATING GEOFENCE MANAGER
Sdk class contains a methoid getGeofenceManager
which allows Navmii SDK user to access geofence manager instance. The geofence manager instance can only be accessed if the SDK is started.
...
GEOFENCE TYPES
The geofence manager supports two types of geofence geometry:
GeofenceCircular
GeofencePolygonal
...
GEOFENCE EVENTS
The geofence manager provides a GeofenceListener
interface to handle transition events:
...
Code Block |
---|
sdk.getGeofenceManager.removeGeofenceListener(listener); |
...
EDITING GEOFENCES
For a circular geofence it’s possible to change its center and radius using setCenter(MapCoordinates center)
and setRadius(double radius)
methods respectively.
...