【问题标题】:How to passed dropoff params to Uber Android App using Deep Linking API?如何使用 Deep Linking API 将 dropoff 参数传递给 Uber Android App?
【发布时间】:2014-10-17 19:38:08
【问题描述】:

我使用 Deep Link API 开发了具有 Uber 特色的 iOS 和 android 应用。

我想将下车参数(纬度、经度、formatted_address 和昵称)传递给 Uber Android 应用。

但是,Uber Developer page 上没有关于 Android 深度链接的文档和示例代码

iOS 应用程序很好!但是,Android 应用不能很好地使用相同的 url 方案。

uber://?action=setPickup&pickup[latitude]=37.775818&pickup[longitude]=-122.418028&pickup[昵称]=UberHQ&pickup[formatted_address]=1455%20Market%20St%2C%20San%20Francisco%2C%20CA%2094103&dropoff [纬度]=37.802374&dropoff[经度]=-122.405818&dropoff[昵称]=Coit%20Tower&dropoff[formatted_address]=1%20Telegraph%20Hill%20Blvd%2C%20San%20Francisco%2C%20CA%2094133&product_id=a1111c8c-c720-46c-3 8534-2fcdd730040d

您能给我任何建议或示例代码吗?

谢谢!

【问题讨论】:

    标签: android deep-linking


    【解决方案1】:

    在android中试试这样

    https://m.uber.com/sign-up?client_id=YOUR_CLIENT_ID
    &first_name=myFirstName&last_name=myLastName&email=test@example.com
    &country_code=us&mobile_country_code=%2B1&mobile_phone=123-456-7890
    &zipcode=94111&product_id=a1111c8c-c720-46c3-8534-2fcdd730040d&pickup_latitude=37.775818
    &pickup_longitude=-122.418028&pickup_nickname=Uber%20HQ
    &pickup_address=1455%20Market%20St%2C%20San%20Francisco%2C%20CA%2094103
    &dropoff_latitude=37.802374&dropoff_longitude=-122.405818
    &dropoff_nickname=Coit%20Tower
    &dropoff_address=1%20Telegraph%20Hill%20Blvd%2C%20San%20Francisco%2C%20CA%2094133
    

    【讨论】:

      【解决方案2】:

      您需要在意图中添加client_id=<The client ID of your application.>

      【讨论】:

        【解决方案3】:

        如果您要使用 uber 移动网站,有一个非常简单的技巧可以尝试将 [] 替换为 _。例如:- &dropoff[nickname] 应该类似于 &dropoff_nickname。 对于 android 应用程序,只需使用 url 编码器,如:- user_locationAddress = URLEncoder.encode(user_locationAddress, "UTF-8");

        在此之后,您可以深度链接到移动网站以及 Android 应用。

        【讨论】:

          猜你喜欢
          • 2016-07-03
          • 1970-01-01
          • 1970-01-01
          • 2013-08-01
          • 2019-07-16
          • 1970-01-01
          • 1970-01-01
          • 2021-09-25
          • 2022-01-06
          相关资源
          最近更新 更多