For Voice to control Nav for map display, get directions, POI search, etc., VIA will send out
Android standard Intent for Nav to consume to rendering page accordingly. Below is the Intent Nav
side should handle or send out to fulfill Nav end to end integration behavior.
Update current location info from Nav to Voice Assistant
Code example of how Voice Assistant send out the Intent:
1 2 3 4 5 6 7 8 910111213141516
varlocation=search_request.locationvalgeo=URLEncoder.encode("geo:${location.latitudeInDegrees}, ${location.longitudeInDegrees}","utf-8")valintentAction="com.telenav.apps.maps.SHOW_SEARCH_RESULTS"valmapIntent=Intent(intentAction)mapIntent.putExtra("api",1)mapIntent.putExtra("original_domain","UDE")mapIntent.putExtra("source","voice")mapIntent.putExtra("request_id",requestID)mapIntent.putExtra("radius",radius)mapIntent.putExtra("location",geo)mapIntent.putExtra("query",query)mapIntent.putExtra("search_result",searchResults.toString())mapIntent.putExtra("brand",brand.toString())// optional, for ICC case nowcontext.sendBroadcast(mapIntent)
Code example of how Nav send back response to continue the dialog:
Voice search content from Nav app(happen in embedded mode only)
Action: com.telenav.apps.maps.ONE_BOX_SEARCH
Bundle Fields:
Key
Value
ValueType
query
"gas stations"
String
radius
5000
int, unit: m
location
31.1234, - 121.1111
Geo location
brand
"Mod Pizza"
String
sort
best_match/distance/price
String enum
Code Example of how Voice Assistant send out the Intent:
1 2 3 4 5 6 7 8 91011121314
vallocation=search_request.locationvalgeo=URLEncoder.encode("geo:${location.latitudeInDegrees}, ${location.longitudeInDegrees}","utf-8")valintentAction="com.telenav.apps.maps.ONE_BOX_SEARCH"valmapIntent=Intent(intentAction)mapIntent.putExtra("api",1)mapIntent.putExtra("original_domain","UDE")mapIntent.putExtra("source","voice")mapIntent.putExtra("request_id",requestID)mapIntent.putExtra("radius",radius)mapIntent.putExtra("location",geo)mapIntent.putExtra("query",query)mapIntent.putExtra("brand",brand.toString())// optional, for ICC case nowcontext.sendBroadcast(mapIntent)
Code Example of how Nav send back response to continue the dialog:
12345678
action=com.telenav.apps.maps.NAV_API_RESULT{"action_path":"/nav/search/find","request_Id":"request id, provided","status_code":0,"source":"cloud | on-board","search_results":["list of search entities"]}
Nav update Context to Voice Assistant
To ensure Voice Assistant could handle Nav commands base on latest context(IGV/AGV, along route points
for search along, destination for search near destination, etc.), it is required that Nav app could always
send this Intent out whenever there is Nav state change(Guidance started/Stopped/arrived, Waypoint added/removed/arrived).