Skip to content

Install the SDK

Add DriveMotion Dependencies

To start development of an application using the Drive Motion Service(SDK), add the SDK as a dependency into the project.

Below is a sample configuration in the project build file for these two components separately.

Add Telenav JFrog Repo

Note

Replace the username and password fields with the repository credentials provided by Telenav.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
repositories {
    ...

    maven {
        url "https://telenav.jfrog.io/artifactory/telenav-maven-releases/"
        credentials {
            username '#REPO_USER_NAME#'
            password '#REPO_PASSWD#'
        }
    }
}

Using DriveMotion SDK 2.X

Dependencies drivemotion and drivemotion-edge in 1.X will no longer available in DriveMotion 2.X. Please update the dependence to using the new DriveMotion 2.X.

1
2
3
4
5
6
7
    dependencies {
        // Implement only ONE of the following libraries to start using SDK under different mode. 
        // Vehicle Mode
        implementation("com.telenav.sdk:telenav-android-drivemotion-vehicle:${driveMotionV2Version}")
        // Mobile Mode
        implementation("com.telenav.sdk:telenav-android-drivemotion-mobile:${driveMotionV2Version}")
    }

Using DriveMotion SDK 1.X

1
2
3
4
5
6
7
    dependencies {
        // Implement only ONE of the following libraries to start using SDK under different mode. 
        // Hybrid Mode, default
        implementation("com.telenav.sdk:telenav-android-drivemotion:${driveMotionV1Version}")
        // Alternative: Offline Mode/Embedded Mode
        implementation("com.telenav.sdk:telenav-android-drivemotion-edge:${driveMotionV1Version}")
    }

Note

Use dependency telenav-android-drivemotion-edge only if working under offline mode. Under this mode, SDK no longer has any network interactions such as request servers, upload events, and so on, and external app may needs to feed necessary data to make SDK working properly.

Other Info

Note

Add the following ProGuard Rule in App side to make sure SqlCipher works properly:

1
2
    -keep class net.sqlcipher.** { *; }
    -keep class net.sqlcipher.database.* { *; }

Tip

The SDK depends on several open source libraries (like okhttp, okio, common-lang.. etc). If you're using Gradle or Maven to download the SDK, these dependencies will be downloaded automatically. If you're downloading it manually, you will also need to add the SDK's dependencies to your project (refer to SDK's POM file).