Class DashcamSdk

java.lang.Object
com.navmii.android.dashcamsdk.DashcamSdk

public class DashcamSdk extends Object
  • Method Details

    • getInstance

      public static DashcamSdk getInstance()
      Returns the instance of the dashcam SDK.
      Returns:
      The DashcamSdk object.
    • getVersionName

      public static String getVersionName()
    • getVersionCode

      public static int getVersionCode()
    • initSdkAsync

      public void initSdkAsync(Context context, DashcamSdk.ConfigurationSettings configurationSettings)
      Initializes the SDK.

      This method should be called one time to initialize the SDK (normally on application startup).

      The process of initialization is asynchronous. Use addStateChangeListener(StateChangeListener) to be notified when initialization has been finished.

      Parameters:
      context - The context.
      configurationSettings - The configuration settings.
    • deinitializeSdk

      public void deinitializeSdk()
      Deinitializes the SDK.

      Use this method to release all resources used by the SDK.

      If state is DashcamSdkState.INITIALIZING, then actual deinitialization will be postponed until initialization finishes (successfully or not). In these cases SDK will skip DashcamSdkState.INITIALIZED or DashcamSdkState.INITIALIZATION_FAILED states, going directly to DashcamSdkState.UNINITIALIZED state.

    • getInitializationError

      @Nullable public DashcamSdk.InitializationError getInitializationError()
      Returns:
      The error that occurred during initialization of the SDK or null if initialization completed successfully.
    • getState

      public DashcamSdkState getState()
      Returns:
      The current state of the SDK.
    • addPositionListener

      public void addPositionListener(DashcamSdk.PositionListener listener)
      Adds a listener that will be notified about events related to the current GPS position.
      Parameters:
      listener - The listener.
    • removePositionListener

      public void removePositionListener(DashcamSdk.PositionListener listener)
      Removes the specified position listener.
      Parameters:
      listener - The listener.
    • addStateChangeListener

      public void addStateChangeListener(DashcamSdk.StateChangeListener listener)
      Adds a listener that will be notified when the current state of the SDK changes.
      Parameters:
      listener - The listener.
    • removeStateChangeListener

      public void removeStateChangeListener(DashcamSdk.StateChangeListener listener)
      Removes the specified state change listener.
      Parameters:
      listener - The listener.
    • addDayNightChangeListener

      public void addDayNightChangeListener(DashcamSdk.DayNightChangeListener listener)
      Adds a listener that will be notified when the change between day and night happens at the current GPS position.
      Parameters:
      listener - The listener.
    • removeDayNightChangeListener

      public void removeDayNightChangeListener(DashcamSdk.DayNightChangeListener listener)
      Removes the specified day/night change listener.
      Parameters:
      listener - The listener.
    • getCurrentPosition

      @Nullable public Location getCurrentPosition()
      Returns:
      Current position.
    • getCurrentRoadName

      public String getCurrentRoadName()
      Returns:
      The name of current road.
    • getCurrentSpeedLimit

      public int getCurrentSpeedLimit()
      Returns:
      Current speed limit in km/h, or 0 if there is no speed limit.
    • getCurrentCountryIso3Code

      public String getCurrentCountryIso3Code()
      Returns:
      ISO3 code of current country or an empty string if current country cannot be determined.
    • getLibraryManager

      public LibraryManager getLibraryManager()
      Returns:
      An instance of a LibraryManager object.
    • getCameraController

      public CameraController getCameraController()
      Returns:
      An instance of a CameraController object.
    • getAdasController

      public AdasController getAdasController()
      Returns:
      An instance of an AdasController object.