android - 我想通过我的应用启动谷歌地图通过意图启动驾驶模式
解决方案
试试下面的代码:
String URL = "https://www.google.com/maps/dir/?api=1&travelmode=driving&dir_action=navigate&destination=Ahmedabad";
Uri location = Uri.parse(URL);
Intent mapIntent = new Intent(Intent.ACTION_VIEW, location);
startActivity(mapIntent);
推荐阅读
- hp-uft - UFT:从excel文件中提取数据并在应用程序中动态输入的问题
- visualvm - VisualVM - 堆转储灰显
- sql-server - 如何向底层视图添加新字段?
- authentication - 使用 Azure 应用服务身份验证的 HttpContext 用户为空
- c# - 使用 Microsoft.CodeAnalysis/Roslyn 获取 XML 文档
- javascript - 如何使用 XPath 解析 JavaScript 内容
- mongodb - $查找对象数组中的id
- c# - 如何在 C# 6.0 的泛型类中包含特定于类型的代码?
- python - 使用 python 对数据框进行多处理 SQL 查询
- python-3.x - 来自不同格式数据帧的新数据帧