【问题标题】:I want to launch google maps Start driving mode via an intent through my app [duplicate]我想通过我的应用程序通过意图启动谷歌地图开始驾驶模式[重复]
【发布时间】:2018-12-12 21:53:39
【问题描述】:

我已经在整个互联网上搜索了这个意图,但直到现在还没有成功,到目前为止我发现的只是相同的旧路线意图,这里有人可以帮助我。随附的是我希望我的应用程序登陆的屏幕。

【问题讨论】:

    标签: android google-maps android-intent


    【解决方案1】:

    试试下面的代码:

    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);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-06
      • 1970-01-01
      • 2015-12-23
      相关资源
      最近更新 更多