Support Navigation Intents

Last edit: 2023.12.29

Android Intents are a quick way to launch a particular app feature from outside of the app without interacting with the app UI. They can be seen as "deeplinks" into our application. The following navigation shortcuts are supported by TTDC.

Supported com.tomtom.navapp.NAVIGATION_SHORTCUT custom action Intents are listed in the following table:

NameNAVIGATION_SHORTCUT actionadb example command
Navigate to a placecom.tomtom.navapp.navshortcuts.navigateadb shell am start -a com.tomtom.navapp.NAVIGATION_SHORTCUT -t "plain/text" -e action com.tomtom.navapp.navshortcuts.navigate --ef com.tomtom.navapp.navshortcuts.latitude 49.84 --ef com.tomtom.navapp.navshortcuts.longitude 24.04 --es com.tomtom.navapp.navshortcuts.name "The\ High\ Castle"
Start searchcom.tomtom.navapp.navshortcuts.opensearchadb shell am start -a com.tomtom.navapp.NAVIGATION_SHORTCUT -t "plain/text" -e action com.tomtom.navapp.navshortcuts.opensearch
Navigate to Homecom.tomtom.navapp.navshortcuts.homeadb shell am start -a com.tomtom.navapp.NAVIGATION_SHORTCUT -t "plain/text" -e action com.tomtom.navapp.navshortcuts.home
Navigate to Workcom.tomtom.navapp.navshortcuts.workadb shell am start -a com.tomtom.navapp.NAVIGATION_SHORTCUT -t "plain/text" -e action com.tomtom.navapp.navshortcuts.work
Stop guidancecom.tomtom.navapp.navshortcuts.stopguidanceadb shell am start -a com.tomtom.navapp.NAVIGATION_SHORTCUT -t "plain/text" -e action com.tomtom.navapp.navshortcuts.stopguidance

Supported generic android.intent.action.VIEW geo Intents are listed in the following table:

NameData Patternadb example command
Show a location at coordinatesgeo:{latitude},{longitude}adb shell am start -a android.intent.action.VIEW -d "geo:47.6,-122.3"
Show a location at coordinates and zoom levelgeo:{latitude},{longitude}?z={zoom}adb shell am start -a android.intent.action.VIEW -d "geo:47.6,-122.3?z=11"
Show a named locationgeo:0,0?q={latitude},{longitude}({label})adb shell am start -a android.intent.action.VIEW -d "geo:0,0?q=34.99,-106.61%28Treasure%29"
Search for locationsgeo:0,0?q={query}adb shell am start -a android.intent.action.VIEW -d "geo:0,0?q=1600+Amphitheatre+Parkway%2C+CA"
Search for POI categorygeo:0,0?q={category}adb shell am start -a android.intent.action.VIEW -d "geo:0,0?q=RESTAURANT"

To add support for the above navigation intents, the relevant intent filters need to be added to the activity section in the AndroidManifest.xml of your product.

AndroidManifest.xml:

1<intent-filter>
2 <action android:name="com.tomtom.navapp.NAVIGATION_SHORTCUT" />
3 <category android:name="android.intent.category.DEFAULT" />
4 <data android:mimeType="*/*" />
5</intent-filter>
6
7<intent-filter>
8 <action android:name="android.intent.action.VIEW" />
9 <category android:name="android.intent.category.DEFAULT" />
10 <data android:scheme="geo" />
11</intent-filter>