/
Route geofencing (v2.1.x - Android)

Route geofencing (v2.1.x - Android)

The core component of Navmii SDK responsible for route geofencing is RouteGeofenceManager. This class provides an API that allows getting notifications of transition events within a route with a specified tolerance.

 

CREATING ROUTE GEOFENCE MANAGER

Sdk class contains getRouteGeofenceManager method which allows the Navmii SDK user to access the route geofence manager instance. The route geofence manager instance can only be accessed if the SDK is started. Use setRoute method to set the current route and setAccuracy method to set an accuracy in meters.

 

ROUTE GEOFENCE EVENTS

The route geofence manager provides a RouteGeofenceListener interface to handle transition events:

  • onRouteGeofenceEnter(String routeName)

  • onRouteGeofenceExit(String routeName)

You can add listeners using addRouteGeofenceListener method:

sdk.getRouteGeofenceManage().addRouteGeofenceListener(routeGeofenceListener);

Use removeRouteGeofenceListener method to detach the listener :

sdk.getRouteGeofenceManage().removeRouteGeofenceListener(routeGeofenceListener);

Related content

Geofencing (v2.1.x - Android)
Geofencing (v2.1.x - Android)
More like this
Displaying points of interest (POI) on the map
Displaying points of interest (POI) on the map
Read with this
Route geofencing (v2.1.x - iOS)
Route geofencing (v2.1.x - iOS)
More like this
Geofencing (v2.1.x - iOS)
Geofencing (v2.1.x - iOS)
More like this
Route Navigation (v2.1.x - Android)
Route Navigation (v2.1.x - Android)
More like this
Route Navigation (v2.1.x – 2.2.x)
Route Navigation (v2.1.x – 2.2.x)
More like this