Support Navigation Intents
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:
Name | NAVIGATION_SHORTCUT action | adb example command |
---|---|---|
Navigate to a place | com.tomtom.navapp.navshortcuts.navigate | adb 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 search | com.tomtom.navapp.navshortcuts.opensearch | adb shell am start -a com.tomtom.navapp.NAVIGATION_SHORTCUT -t "plain/text" -e action com.tomtom.navapp.navshortcuts.opensearch |
Navigate to Home | com.tomtom.navapp.navshortcuts.home | adb shell am start -a com.tomtom.navapp.NAVIGATION_SHORTCUT -t "plain/text" -e action com.tomtom.navapp.navshortcuts.home |
Navigate to Work | com.tomtom.navapp.navshortcuts.work | adb shell am start -a com.tomtom.navapp.NAVIGATION_SHORTCUT -t "plain/text" -e action com.tomtom.navapp.navshortcuts.work |
Stop guidance | com.tomtom.navapp.navshortcuts.stopguidance | adb 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:
Name | Data Pattern | adb example command |
---|---|---|
Show a location at coordinates | geo:{latitude},{longitude} | adb shell am start -a android.intent.action.VIEW -d "geo:47.6,-122.3" |
Show a location at coordinates and zoom level | geo:{latitude},{longitude}?z={zoom} | adb shell am start -a android.intent.action.VIEW -d "geo:47.6,-122.3?z=11" |
Show a named location | geo: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 locations | geo: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 category | geo: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>67<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>