启动 Google 导航时出现问题
我尝试了很多个小时从我的应用程序启动导航。 我想要没有目的地的导航。
我尝试使用
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q="));
startActivity(i);
That 启动导航,但未找到目的地
我也尝试使用 com.google.android.apps.maps 启动 processName、packageName 和 startIntent, com.google.android.apps.maps:driveabout 和 **com.google.android.maps.driveabout.app.DestinationActivity
也没有成功:/
一个想法?
i tried since many hours to launch navigation from my app.
I want navigation without destination.
i tried with
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q="));
startActivity(i);
That launches navigation but with destination not found
I tried too to launch processName, packageName with startIntent with com.google.android.apps.maps,
com.google.android.apps.maps:driveabout and
**com.google.android.maps.driveabout.app.DestinationActivity
with no succes too :/
an idea ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
以下代码应该可以工作...
The following code should work...
仔细看看 Google 导航的意图过滤器。可能是因为它不是设计为在没有指定目的地的情况下通过 Intent 启动的。不幸的是,我不知道在哪里可以找到有关 Google 导航意图过滤器的信息,但如果您向我展示您正在寻找的位置,我可以帮助您找到答案。
Take a closer look a the intent filter for Google Navigation. It could be that it is not designed to be started via Intent without a specified destination. Unfortunately, i don't know where to find information about Google Navigation's intent filter, but if you were to show me where you are looking i could help you figure it out.
尝试使用
Try using
我不想集成它,我只想像单击带有家庭启动器的应用程序列表一样启动它。
我已经尝试过google home示例,并且可以启动导航。
但我不明白为什么这不适用于我自己的应用程序:/
i don't want to integrate it, i just want to launch it like a click on the list of apps whith a home launcher.
I've tried the google home sample, and navigation can be launched.
but i don't understand why that doesn't work with my own app :/
Google 导航没有任何已记录且受支持的
Intent
过滤器。它并非旨在从第三方应用程序集成。Google Navigation does not have any documented and supported
Intent
filters. It is not designed to be integrated from third party apps.