Package es.situm.sdk

Class 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:

     android:value="API_USER_EMAIL" />
     android:value="API_KEY" />
    See Also:
    Configuration, CommunicationManager, LocationManager, DirectionsManager, NavigationManager
    • Constructor Detail

      • SitumSdk

        public SitumSdk()
    • Method Detail

      • 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.
        context - Your application context.
      • getVersion

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

        public static Configuration configuration()
        Returns the public configuration holder. Use it to provide authentication credentials, and change some options as you need.
        IllegalStateException - if init(Context) wasn't invoked or no credentials were provided
      • navigationManager

        public static NavigationManager navigationManager()
        Returns the navigation manager. Use it to guide a user through a route in real time.
        IllegalStateException - if init(Context) wasn't invoked or no credentials were provided
      • calibrationManager

        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.
        IllegalStateException - if init(Context) wasn't invoked or no credentials were provided
      • 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
      • isInitialized

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