0
votes

I develop iOS & android app featuring Uber using Deep Link API.

I'd like to pass the dropoff params (latitude, longitude, formatted_address and nickname) to Uber Android App.

But, There aren't documents & sample code about Android Deep Linking on Uber Developer page

iOS app was well! but, Android app is not well using same url scheme.

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

Could you give me any advice or sample code?

Thanks!

3

3 Answers

0
votes

Try like this in android

https://m.uber.com/sign-up?client_id=YOUR_CLIENT_ID
&first_name=myFirstName&last_name=myLastName&[email protected]
&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
0
votes

You need to add client_id=<The client ID of your application.> in intent.

0
votes

Well there is a very simple trick to this in case if you are going for a uber mobile site just try and replace the [] with _. eg:- &dropoff[nickname] should be like &dropoff_nickname. And for android app just use the url encoder like:- user_locationAddress = URLEncoder.encode(user_locationAddress, "UTF-8");

After this you are good to go for deeplinking to mobile site as well as for android app.