启动 Google 导航时出现问题

发布于 2024-09-18 15:02:44 字数 473 浏览 3 评论 0原文

我尝试了很多个小时从我的应用程序启动导航。 我想要没有目的地的导航。

我尝试使用

        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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

他夏了夏天 2024-09-25 15:02:45

以下代码应该可以工作...

String url = "google.navigation:q="+startPos.getLatitude()+","+startPos.getLongitude();
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(url));            
startActivity(i);

The following code should work...

String url = "google.navigation:q="+startPos.getLatitude()+","+startPos.getLongitude();
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(url));            
startActivity(i);
夜灵血窟げ 2024-09-25 15:02:45

仔细看看 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.

心房的律动 2024-09-25 15:02:45

尝试使用

google.navigation:fd=true

Try using

google.navigation:fd=true
无妨# 2024-09-25 15:02:45

我不想集成它,我只想像单击带有家庭启动器的应用程序列表一样启动它。

我已经尝试过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 :/

七色彩虹 2024-09-25 15:02:44

Google 导航没有任何已记录且受支持的 Intent 过滤器。它并非旨在从第三方应用程序集成。

Google Navigation does not have any documented and supported Intent filters. It is not designed to be integrated from third party apps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文