【问题标题】:URL Schemes for most popular mobile platforms最流行的移动平台的 URL 方案
【发布时间】:2013-11-26 00:58:57
【问题描述】:

我们只想将 Google 地图应用(在最流行的智能手机操作系统上)打开到特定的纬度/经度,并显示路况。

这适用于 iPhone,comgooglemaps://?center=39.718042,-104.959302&zoom=14&views=traffic

Android 的等价物是什么?

谢谢!

【问题讨论】:

    标签: android ios url url-scheme


    【解决方案1】:

    在 Android 上,您可以通过以下方式触发 Intent:

    String lat = "48.856035";
    String lng = "2.346030";
    startActivity(this, new Intent(Intent.ACTION_VIEW, Uri.parse("geo:" + lat + "," + lng));
    

    所有其他参数可以在developer.android.com找到

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-04
      • 1970-01-01
      • 2011-09-29
      • 2012-10-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多