Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
278 changes: 278 additions & 0 deletions tomtom-navigation-core-examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@
# Created by https://www.toptal.com/developers/gitignore/api/android,androidstudio,macos,gradle,firebase,kotlin,git,bitrise,jenv
# Edit at https://www.toptal.com/developers/gitignore?templates=android,androidstudio,macos,gradle,firebase,kotlin,git,bitrise,jenv

### Android ###
# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Log/OS Files
*.log

# Android Studio generated files and folders
captures/
.externalNativeBuild/
.cxx/
*.apk
output.json

# IntelliJ
*.iml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml

# Keystore files
*.jks
*.keystore

# Google Services (e.g. APIs or Firebase)
google-services.json
firebase.json

# Android Profiling
*.hprof

### Android Patch ###
gen-external-apklibs

# Replacement of .externalNativeBuild directories introduced
# with Android Studio 3.5.

### Bitrise ###
.bitrise.secrets.yml

### Firebase ###
.idea
**/node_modules/*
**/.firebaserc

### Firebase Patch ###
.runtimeconfig.json
.firebase/

### Git ###
# Created by git for backups. To disable backups in Git:
# $ git config --global mergetool.keepBackup false
*.orig

# Created by git when using merge tools for conflicts
*.BACKUP.*
*.BASE.*
*.LOCAL.*
*.REMOTE.*
*_BACKUP_*.txt
*_BASE_*.txt
*_LOCAL_*.txt
*_REMOTE_*.txt

### JEnv ###
# JEnv local Java version configuration file
.java-version

# Used by previous versions of JEnv
.jenv-version

### Kotlin ###
# Compiled class file
*.class

# Log file

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### macOS Patch ###
# iCloud generated files
*.icloud

### Gradle ###
.gradle
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties

# Cache of project
.gradletasknamecache

# Eclipse Gradle plugin generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath

### Gradle Patch ###
# Java heap dump

### AndroidStudio ###
# Covers files to be ignored for android development using Android Studio.

# Built application files
*.ap_
*.aab

# Files for the ART/Dalvik VM
*.dex

# Java class files

# Generated files
bin/
gen/
out/

# Gradle files

# Signing files
.signing/

# Local configuration file (sdk path, etc)

# Proguard folder generated by Eclipse
proguard/

# Log Files

# Android Studio
/*/build/
/*/local.properties
/*/out
/*/*/build
/*/*/production
.navigation/
*.ipr
*~
*.swp

# Keystore files

# Google Services (e.g. APIs or Firebase)
# google-services.json

# Android Patch

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# NDK
obj/

# IntelliJ IDEA
*.iws
/out/

# User-specific configurations
.idea/caches/
.idea/libraries/
.idea/shelf/
.idea/workspace.xml
.idea/tasks.xml
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
.idea/assetWizardSettings.xml
.idea/gradle.xml
.idea/jarRepositories.xml
.idea/navEditor.xml

# Legacy Eclipse project files
.cproject
.settings/

# Mobile Tools for Java (J2ME)

# Package Files #

# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)

## Plugin-specific files:

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Mongo Explorer plugin
.idea/mongoSettings.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### AndroidStudio Patch ###

!/gradle/wrapper/gradle-wrapper.jar

# End of https://www.toptal.com/developers/gitignore/api/android,androidstudio,macos,gradle,firebase,kotlin,git,bitrise,jenv
37 changes: 33 additions & 4 deletions tomtom-navigation-core-examples/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[versions]
androidx_compat = "1.6.1"
androidx_constraintlayout = "2.1.4"
androidx_activityCompose = "1.8.2"
androidx_composeBom = "2024.03.00"
default_world_map = "45424"
tomtom_sdk = "1.8.0"

Expand All @@ -13,19 +15,46 @@ locationProvider = { module = "com.tomtom.sdk.location:provider-android", versio
locationSimulation = { module = "com.tomtom.sdk.location:provider-simulation", version.ref = "tomtom_sdk" }
locationMapmatched = { module = "com.tomtom.sdk.location:provider-map-matched", version.ref = "tomtom_sdk" }
mapsDisplay = { module = "com.tomtom.sdk.maps:map-display", version.ref = "tomtom_sdk" }
navigationOffline = { module = "com.tomtom.sdk.navigation:navigation-offline", version.ref = "tomtom_sdk" }
navigationUi = { module = "com.tomtom.sdk.navigation:ui", version.ref = "tomtom_sdk" }
navigationOffline = { module = "com.tomtom.sdk.navigation:navigation-offline", version.ref = "tomtom_sdk" }
routeReplannerOffline = { module = "com.tomtom.sdk.routing:route-planner-offline", version.ref = "tomtom_sdk" }
styleProviderOffline = { module = "com.tomtom.sdk.maps:style-provider-offline", version.ref = "tomtom_sdk" }
androidXCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx_compat" }
androidXConstraintLayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidx_constraintlayout" }
defaultMap = { module = "com.tomtom.sdk.datamanagement.nds:default-world-map", version.ref = "default_world_map" }
navigationOnline = { module = "com.tomtom.sdk.navigation:navigation-online", version.ref = "tomtom_sdk" }
routePlannerOnline = { module = "com.tomtom.sdk.routing:route-planner-online", version.ref = "tomtom_sdk" }
routeReplannerOnline = { module = "com.tomtom.sdk.navigation:route-replanner-online", version.ref = "tomtom_sdk" }
androidXCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx_compat" }
androidXConstraintLayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidx_constraintlayout" }
androidxActivityCompose = { group = "androidx.activity", name = "activity-compose", version.ref = "androidx_activityCompose" }
compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "androidx_composeBom" }
compose-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
compose-material-icons-core = { group = "androidx.compose.material", name = "material-icons-core" }
compose-material-icons-extended = { group = "androidx.compose.material", name = "material-icons-extended" }
compose-material3 = { group = "androidx.compose.material3", name = "material3" }
compose-material3-window-size = { group = "androidx.compose.material3", name = "material3-window-size-class" }
compose-runtime-livedata = { group = "androidx.compose.runtime", name = "runtime-livedata" }
compose-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
compose-ui = { group = "androidx.compose.ui", name = "ui" }
compose-viewbinding = { group = "androidx.compose.ui", name = "ui-viewbinding" }

[bundles]
androidCommon = ["androidXCompat", "androidXConstraintLayout"]
androidCommon = [
"androidXCompat",
"androidXConstraintLayout",
"androidxActivityCompose",
]

androidCompose = [
"compose-graphics",
"compose-material-icons-core",
"compose-material-icons-extended",
"compose-material3",
"compose-material3-window-size",
"compose-runtime-livedata",
"compose-tooling-preview",
"compose-ui",
"compose-viewbinding",
]

[plugins]
androidApplication = { id = "com.android.application", version = "8.5.0" }
Expand Down
11 changes: 10 additions & 1 deletion tomtom-navigation-core-examples/usecase/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ android {

defaultConfig {
minSdk = 26
targetSdk = 33
targetSdk = 34
versionCode = 1
versionName = "1.0"
buildConfigField("String", "TOMTOM_API_KEY", "\"${extra["tomtomApiKey"].toString()}\"")
Expand All @@ -36,9 +36,14 @@ android {
jvmTarget = "1.8"
}

composeOptions {
kotlinCompilerExtensionVersion = "1.5.11"
}

buildFeatures {
viewBinding = true
buildConfig = true
compose = true
}
}

Expand All @@ -55,4 +60,8 @@ dependencies {

// Android dependencies.
implementation(libs.bundles.androidCommon)

// Compose
implementation(platform(libs.compose.bom))
implementation(libs.bundles.androidCompose)
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
<!-- Always include this permission -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<!-- Include only if your app benefits from precise location access. -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<application
android:label="Navigation App"
tools:targetApi="33"
tools:targetApi="34"
android:theme="@style/Theme.App">

<activity
android:name=".MainActivity"
android:name=".BasicNavigationCompose"
android:exported="true">

<intent-filter>
Expand Down
Loading