Route4Trucks Deep Link Route Navigation – Open Link To Launch Route Navigation
Deep Link Navigation on the Route4Trucks trucker navigation app enables you to create a custom URL that includes route destinations and commercial parameters. Send the Deep Link to one of your truckers, they open it, and Route4Trucks automatically starts route navigation to the destinations included in the link. The route accounts for commercial vehicle details, such as weight, height, width, and hazardous material restrictions, ensuring your trucks avoid unsuitable or restricted areas.
Keep reading to learn how to create a Route4Trucks Deep Link with addresses, supported vehicle parameters, and more.
Route4Trucks For Company Drivers
Table of Contents
Create Deep Link – Route4Trucks Navigation Link Template
You can generate Deep Links manually or with a third-party system. To create a new Deep Link Navigation URL manually, simply replace the parameters in the example links from the table below with your preferred parameters.
In detail, a Deep Link URL includes:
- The Route4Trucks Navigation App link – “route4trucks://nav/“
- One or more destination addresses or coordinates separated with “;” – “?addrs=%5B[ADDRESS;ADDRESS;ADDRESS]%5D“
- Commercial vehicle parameters added with “&” – such as “&axleCount=4” for a four-axle truck
You can find a full list of parameters, including minimum and maximum values, in the next section of this guide.
NOTE: You can include multiple addresses and coordinates separated by “;” up to a maximum Deep Link length of 2048 characters. The maximum Deep Link length applies to both the Android and iPhone iOS versions of the Route4Trucks app.
Multiple Addresses
(separated by ";")
Deep Link Parameters – Truck Navigation Link Parameters
The table below contains the list of available parameters that can be customized in Route4Trucks Deep Links.
addrs
addrs=%5B27.952947%2C-82.459493%5D
No limit up to maximum Deep Link length.
(2048 characters)
Coordinates or addresses of the destinations for navigation. Navigation is generated from the driver's current location to the first added location.
unit
unit=i
-
Measurement units. Specified units are applied to all parameters in the navigation (i.e., route distance, vehicle parameters, etc.).
Available Units:
- "m" (Metric)
- "i" (Imperial)
- wght
- wei
wei=1000
min: 1000 lbs (453 kg)
max: 156,470 lbs (70,974 kg)
Total weight of the vehicle in pounds or kilograms depending on the specified units.
- axleGrpWght
- axw
axleGrpWght=1000
min: 200 lbs (90 kg)
max: 80,000 lbs (36,287 kg)
Total weight per axle of the vehicle in pounds or kilograms depending on the specified units.
len
len=12.45
min: 8 ft (2.44 m)
max: 70 ft (21.34 m)
Total length of the vehicle in feet and inches or meters and centimeters depending on the specified units.
wid
wid=3.7
min: 5 ft (1.52 m)
max: 8 ft 6 in (2.59 m)
Total width of the vehicle in feet and inches or meters and centimeters depending on the specified units.
hei
hei=5.6
min: 5 ft (1.52 m)
max: 15 ft (4.57 m)
Total height of the vehicle in feet and inches or meters and centimeters depending on the specified units.
axleCount
axleCount=2
2–255
Total number of axles of the vehicle.
hazmat
hazmat=%5Bcor%2Cgas%2Cflam%5D
-
Hazardous materials transported by the vehicle. Available Options:
- "expl" (Explosives)
- "gas" (Gas)
- "flam" (Flammable)
- "comb" (Combustible)
- "org" (Organic)
- "pois" (Poison)
- "rad" (Radioactive)
- "cor" (Corrosive)
- "poisInh"
(Poisonous Inhalation) - "harmToWtr"
(Harmful to Water) - "other" (Other)
avoid
avoid=%5Btunnel%2Ctoll%2Chwy%2Cdirt%5D
-
Avoid certain roads if possible.
Available Options:
- "hwy" (Avoid Highways)
- "toll" (Avoid Toll Roads)
- "ferry" (Avoid Ferries)
- "tunnel" (Avoid Tunnels)
- "dirt" (Avoid Dirt Roads)
Deep Link Callback – Return Users To Your App After Navigation
You can easily add Callbacks to your Deeplinks. This enables you to automatically redirect a driver back to an app after they end navigation. Simply add the “x-callback-url” parameter to your Deeplink like the example below:
- route4trucks://x-callback-url/nav/?addrs=….
To define the Callback, add the “&callback=” parameter and Deeplink to your app as a string like the example below:
- yourapp://callback?key_button=com.example.yourapp
NOTE: You can include any Deeplink in the string as long as your app can support it (string length, etc.).
Add Deep Link Support To Your App
Include the following code which handles Deeplink Callback in the activity:
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
}
Then add the following to your app manifest:
<activity> android:name=".ExampleDeeplinkActivity" android:launchMode="singleTop" android:exported="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="yourapp" /> </intent-filter> </activity>
Deep Link URL Encoding – Create Valid URLs For Navigation Links
To ensure Deeplinks work on all devices, operating systems, and communication methods, follow URL encoding best practices. Some characters, such as spaces, should be avoided, while other characters have specific reserved functions. Your web browser or URL generator may automatically convert invalid characters, but the most reliable way to create valid URLs is to translate non-alphanumeric characters into encoded values according to the Uniform Resource Identifier (URI) specification.
For example, a standard address like “1010 N Florida Ave, Tampa, FL 33602, USA” can be encoded as either of these examples:
1
%5B1010+N+Florida+Ave%2C+Tampa%2C+FL+33602%2C+USA%5D
2
%5B1010%20N%20Florida%20Ave%2C%20Tampa%2C%20FL%2033602%2C%20USA%5D
For your convenience, the table below includes the most common invalid URL characters and their encoded values.
Space
%20 or +
, (comma)
%2C
[
%5B
]
%5D
"
%22
<
%3C
>
%3E
#
%23
%
%25
NOTE: The “&” character in an address (“5th & Main“) must be encoded as “%26” because “&” is reserved for URL parameters.
Last Updated: