如何使用Deep Linking API将dropoff params传递给Uber Android App?

时间:2014-08-24 14:13:44

标签: android deep-linking

我开发iOS&安卓使用Deep Link API的Android应用程序。

我想将dropoff params(纬度,经度,formatted_address和昵称)传递给Uber Android App。

但是,没有文件&关于Uber Developer page

上Android深层链接的示例代码

iOS应用很棒!但是,Android应用程序并没有很好地使用相同的url方案。

  

超级://动作= setPickup&安培;拾取[纬度] = 37.775818&安培;拾取[经度] = -122.418028&安培;拾取[昵称] = UberHQ&安培;拾取[的formatted_address] = 1455%20Market%20ST%2C%20San %20Francisco%2C%20CA%2094103&安培;送货[纬度] = 37.802374&安培;送货[经度] = - 122.405818&安培;送货[昵称] =科伊特%20Tower&安培;送货[的formatted_address] = 1%20Telegraph%20Hill%20Blvd%2C% 20San%20Francisco%2C%20CA%2094133&安培; PRODUCT_ID = a1111c8c-c720-46c3-8534-2fcdd730040d

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

谢谢!

3 个答案:

答案 0 :(得分:0)

在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

答案 1 :(得分:0)

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

答案 2 :(得分:0)

有一个非常简单的技巧,如果你想要一个超级移动网站,只需尝试用_替换[]。例如: - &amp; dropoff [nickname]应该和&amp; dropoff_nickname一样。     对于Android应用程序,只需使用url编码器,如: -  user_locationAddress = URLEncoder.encode(user_locationAddress,&#34; UTF-8&#34;);

在此之后,您可以继续深入链接到移动网站以及Android应用程序。