Skip to content

Class NavigineSdk

PavelTychinin edited this page Oct 29, 2021 · 4 revisions

Class NavigineSdk contains a list of static functions for initializing library, and list of functions for getting access to the managers, each of which will provide different opportunities for working with SDK.

Public Methods

Function setUserHash

public static void setUserHash(String userHash)

This function initialises the user hash value of NavigineSdk.

Parameters
  • userHash — user security key.

Function setServer

public static void setServer(String server)

This function initialises the server value of NavigineSdk.

Parameters
  • serverUrl — server URL (in the format http[s]://host[:port], e.g. "https://api.navigine.com").

Function getInstance

public static NavigineSdk getInstance()

This function initializes Navigation library and returns NavigineSdk instance.

Return value

NavigineSdk instance, which could be used for getting managers.

Function getLocationListManager

public static LocationListManager getLocationListManager()

This function returns the LocationListManager class instance.

Return value

LocationListManager instance, which could be used for working with the list of LocationInfos.

Function getLocationManager

public static LocationManager getLocationManager()

This function returns the LocationManager class instance.

Return value

LocationManager instance, which could be used for working with the Location.

Function getNavigationManager

public static NavigationManager getNavigationManager(LocationManager locationManager)

This function returns the NavigationManager class instance.

Parameters
Return value

NavigationManager instance, which could be used for working with the Position.

Function getRouteManager

public static RouteManager getRouteManager(LocationManager locationManager, NavigationManager navigationManager)

This function returns the RouteManager class instance.

Parameters
Return value

RouteManager instance, which could be used for working making routes, setting target points. (See RoutePath class).

Function getZoneManager

public static ZoneManager getZoneManager(LocationManager locationManager, NavigationManager navigationManager)

This function returns the ZoneManager class instance.

Parameters
Return value

ZoneManager instance, which could be used for working with zones and detecting enter and leave events. (See Zone class).

Function getNotificationManager

public static NotificationManager getNotificationManager(LocationManager locationManager)

This function returns the NotificationManager class instance.

Parameters
Return value

NotificationManager instance, which could be used for working with notifications when detecting beacons. (See Notification class).

Function getMeasurementManager

public static MeasurementManager getMeasurementManager()

This function returns the MeasurementManager class instance.

Return value

MeasurementManager instance, which could be used for working with signals and sensors. (See SignalMeasurement and SensorMeasurement classes).

Function getLocationEditManager

public static LocationEditManager getLocationEditManager(LocationManager locationManager)

This function returns the LocationEditManager class instance.

Parameters
Return value

InspectManager instance, which could be used for modifying location and uploading changes to the server. (See Location class).

Function getResourceManager

public static ResourceManager getResourceManager(LocationManager locationManager)

This function returns the ResourceManager class instance.

Parameters
Return value

ResourceManager instance, which could be used for working with images, uploading user files and events, working with log files.

Usage example

Do not forget to set your User Hash and server before getting the instance of NavigineSdk, so it would be correctly initialised!

...

  Navigine.initialize(context);
  NavigineSdk.setUserHash( /* Your User Hash*/ );
  NavigineSdk.setServer( /* Server Url */ );
  NavigineSdk mNavigineSdk = NavigineSdk.getInstance();
  
  LocationListManager mLocationListManager = mNavigineSdk.getLocationListManager();
  LocationManager     mLocationManager     = mNavigineSdk.getLocationManager();
  NavigationManager   mNavigationManager   = mNavigineSdk.getNavigationManager(mLocationManager);
  RouteManager        mRouteManager        = mNavigineSdk.getRouteManager(mLocationManager, mNavigationManager);
  MeasurementManager  mMeasurementManager  = mNavigineSdk.getMeasurementManager();
  ResourceManager     mResourceManager     = mNavigineSdk.getResourceManager(mLocationManager);

...
Clone this wiki locally