在这里启动通过意图导航地图 [英] launching Here maps navigation via intent
问题描述
我想通过一次操作从当前位置启动导航(自驾)到保存为家"的导航. 看来可以使用Intent完成,但是我尝试过的操作(Data:google.navigation:q ="my address")使用destination = my address打开了应用程序,但是我必须单击"DIRECTIONS"才能看到路线. 是否有避免这种手动步骤的方法? 谢谢. 路易吉.
I'd like to launch the navigation (by car) from my current position to the one saved as 'home' with a single action. It seems it can be done using intent, but the one I've tried (Data:google.navigation:q="my address") open the app with destination = my address, but I have to click on "DIRECTIONS" for seeing the routes. Is there a way for the intent to avoid that manual step? Thanks. Luigi.
推荐答案
我使用以下方法使其工作:
I got it working using the following:
val uri = Uri.parse("here.directions://v1.0/mylocation/37.870090,-122.268150?m=w")
val intent = Intent(Intent.ACTION_VIEW, uri)
intent.setPackage("com.here.app.maps")
activity.startActivity(intent)
希望这可以帮助任何寻求解决方案的人.
Hope this helps anyone looking for a solution to this.
这篇关于在这里启动通过意图导航地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!