Android - 从应用程序启动 Google 导航 [英] Android - Launching Google Navigation from an app

查看:35
本文介绍了Android - 从应用程序启动 Google 导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发一个 android 应用程序,该应用程序由用户获取一些坐标(从 gps 的起点和用户定义的目的地)

I am currently in progress of an android app, which takes some coordinates by the user (Starting point from gps and destination defined by the user)

我希望我的应用程序启动谷歌导航,以便它可以引导用户完成这些点.在下一步中,我想为导航提供更多点(例如一些兴趣点),以便它将引导用户通过包含所有点的特定路线.

I would like my app to launch the google navigation so that it can guide the user through these points. At a next step, I would like to give navigation more points (eg some points of interest) so that it will guide the user through a specific route containing all the points.

这可能吗?我发现的只是没有记录的做法,也没有例子.有没有人解决了这个问题?如果没有,有人可以建议其他一些导航程序吗?

Is that possible? All that I find is no-documented practices and no examples. Is there anyone who has solved this problem? If not, can someone suggest some other navigation programm?

提前谢谢你,乔治

推荐答案

你当然可以引导他们到一个点:

You can certainly guide them to a single point:

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q=" +mLat+","+mLong));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);

不确定设置路径点可能是某种方法,我认为 API 未记录,因此使用风险自负.你可以让你的应用在后台监听 GPS 信息,并让它在某些时候提示用户.

Not sure about setting way points might be some way to do it, I think the API is undocumented so use at your own risk. You could have your app in the background listening to the GPS information and have it prompt the user at certain points.

这篇关于Android - 从应用程序启动 Google 导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆