Package es.situm.sdk

Class SitumSdk

java.lang.Object
es.situm.sdk.SitumSdk

public class SitumSdk extends Object
Main entry point for the Situm SDK. With this class you can get the managers to fetch resources from server, start the positioning, calculate a route and navigate through it.

You must call init(Context) inside Application.onCreate() in your Application to initialize the SDK.

After initialized, you can provide the authentication credentials and configure the Situm SDK with configuration(). Also, you can set the credentials in the AndroidManifest.xml file, it will be loaded automatically. To do this, use this meta-data fields:

 

 <meta-data
 android:name="es.situm.sdk.API_USER"
 android:value="API_USER_EMAIL" />
 <meta-data
 android:name="es.situm.sdk.API_KEY"
 android:value="API_KEY" />
 
 
See Also:
  • Constructor Details

    • SitumSdk

      public SitumSdk()
  • Method Details

    • init

      public static void init(android.content.Context context)
      Initialize SDK. You have to call this function prior any call to other method. This method can be safely called many times as it will only initialise the SDK if it is not already initialised.
      Parameters:
      context - Your application context.
    • getVersion

      public static String getVersion()
      Returns the version of the Situm SDK
    • communicationManager

      @NonNull public static CommunicationManager communicationManager()
      Returns the communication manager. Use it to make request to the server.
      Throws:
      IllegalStateException - if init(Context) wasn't invoked
    • locationManager

      @NonNull public static LocationManager locationManager()
      Returns the location manager. Use it to start and stop the location.
      Throws:
      IllegalStateException - if init(Context) wasn't invoked
    • configuration

      @NonNull public static Configuration configuration()
      Returns the public configuration holder. Use it to provide authentication credentials, and change some options as you need.
      Throws:
      IllegalStateException - if init(Context) wasn't invoked
    • directionsManager

      @NonNull public static DirectionsManager directionsManager()
      Returns the route manager. Use it to obtain routes between two points
      Throws:
      IllegalStateException - if init(Context) wasn't invoked or no credentials were provided
    • realtimeManager

      @NonNull public static RealTimeManager realtimeManager()
      Returns realtime manager. It can be used to obtain data in realtime, check RealTimeManager for more info.
      Returns:
      RealtimeManager
      Throws:
      IllegalStateException - if init(Context) wasn't invoked
    • calibrationManager

      @NonNull public static es.situm.sdk.calibration.CalibrationManager calibrationManager()
      Returns the CalibrationManager which can be used to calibrate Buildings. Check CalibrationManager for more info on its usage.
      Returns:
      CalibrationManager
      Throws:
      IllegalStateException - if init(Context) wasn't invoked
    • userHelperManager

      @NonNull public static es.situm.sdk.userhelper.UserHelperManager userHelperManager()
      Returns the UserHelperManager. This manager assists users in configuring their device to be able to use our system properly. It provides UI components to guide users through various setup tasks, such as requesting permissions or enabling device sensors. For a detailed explanation of the supported use cases, refer to UserHelperManager.autoManage(boolean).
      Returns:
      UserHelperManager The instance of the UserHelperManager.
      Throws:
      IllegalStateException - If init(Context) has not been called before invoking this method.
    • setDebugOption

      public static void setDebugOption(String key, String value)
      Set internal debug options.
    • setDebugOption

      public static void setDebugOption(String key, boolean value)
      Set internal debug options.
    • setSimulatedLocationManager

      public static void setSimulatedLocationManager(@Nullable LocationManager locationManager)
      Set a simulated location manager. This Location Manager will replace the Location Manager. To remove the simulated location manager call this method passing null parameter
    • isUsingSimulatedLocationManager

      public static boolean isUsingSimulatedLocationManager()
      Return true if a simulated location manager is set, false otherwise
    • getDeviceID

      @NonNull public static long getDeviceID()
      Return the device ID used internally in the SDK
      Throws:
      IllegalStateException - if init(Context) wasn't invoked
    • isInitialized

      public static boolean isInitialized()
      Return true when the SDK has been initialized calling init(Context)