Project set up
Navigation SDK for Android is only available upon request. Contact us to get started.
This guide describes how to prepare your Android project for using TomTom SDKs.
- Install Android Studio if you don’t already have it.
- Create a new project or open an existing one. Make sure that the minimum SDK API level is set to at least 21 (Android 5.0 "Lollipop") and that the compile SDK API level is set to 31.
- Add the
packagingOptions
.1android {2 ...3 packagingOptions {4 jniLibs.pickFirsts.add("lib/**/libc++_shared.so")5 }6} - Because the repository for Navigation SDK is private, you will need to contact us to get access.
- Once you have obtained access, go to repositories.tomtom.com and log in with your account. Expand the user menu in the top-right corner, and select "Edit profile" → "Generate an Identity Token". Copy your token and put it, together with your login, in the
settings.gradle
file of your project, replacing the repositoryUsername and repositoryToken placeholders.1dependencyResolutionManagement {2 repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)3 repositories {4 google()5 mavenCentral()6 maven {7 credentials {8 username = repositoryUsername9 password = repositoryToken10 }11 url = uri("https://repositories.tomtom.com/artifactory/maven")12 }13 }14} - Add the dependencies that you need in your application to your module’s
build.gradle
file and synchronize the project.
Next steps
Now that you’ve set up your project, here are some suggestions for what to do with it: