AndroidAuto的Route Preview template已經Deprecated,將改用MapWithContentTemplate

JLin
5 min readJun 5, 2024

--

從網站可以看到原本的Route Preview template 已經被Deprecated

改推薦用

> Note: This template is deprecated in favor of the Map + Content template. Designers and developers should work to update their task flows to make use of the new template.

MapContentTemplate

https://developers.google.com/cars/design/create-apps/apps-for-drivers/templates/map-content-template

但問題是,他沒有告知,路徑規劃應該會是用什麼方式進行設定,也許可能要去看他的Sample Code有沒有更新了

但概念是,他底部是地圖,在上面可以setContentTemplate ,可以設定這四種不同的地圖,而且目前是要支援Car Level 7才能使用,可能不一定所有的硬體都有支援,變成要支援的話,可能同時要支援低於Level7的硬體? 寫法上的差異似乎就很大

NavigationTemplate.Builder

也可以看到設定方式

其他就要等實測才能知道結果了

Search On Navigation的改變

看起來現在如果設定Search Template ,變成可以在導航中呼叫searchTemplate,但也可以透過Show Map切回到地圖導航中的狀態去進行顯示清單

回過頭來剛剛看到導航規劃透過map template 的流程,似乎在這邊有提到

似乎就是透過List Template ,然後沒有原本的一些RoutePreview的限制了

--

--

JLin

JAVA / Android /Kotlin / Kotlin Native 對於Kotlin衍生的JVM等技術 Compose for web / desktop / Ktor Server,或是生成式AI (Gemini/OpenAI)各式應用, 都有小興趣