0
votes

For the RideRequestWidget I have the following Code

RideParameters rideParams = new RideParameters.Builder()
                .setProductId("83941b0d-4be1-4979-a9c0-f0af5ee2b89b")
                .setPickupLocation(19.1136, 72.8679, "Uber HQ", "1455 Market Street, San Francisco")
                .setDropoffLocation(19.1145, 72.8675, "Embarcadero", "One Embarcadero Center, San Francisco")
                .build();
        SessionConfiguration config = new SessionConfiguration.Builder()
                .setClientId(AppController.UBER_CLIENT_ID)
                .setServerToken(AppController.UBER_SERVER_TOKEN)
                .build();
        ServerTokenSession session = new ServerTokenSession(config);

        holder.uberButton.setRideParameters(rideParams);
        holder.uberButton.setRequestBehavior(new RideRequestActivityBehavior((Activity) mContext, 1234));
        holder.uberButton.setSession(session);
        holder.uberButton.setCallback(callback);
        holder.uberButton.loadRideInformation();

Exactly from the Uber Docs.

I have some questions.

  1. I have a phone on which Uber app is not installed. When the Ride Button is clicked , it nicely takes me to the webview and I can login and request for cab all seamlessly (ofcourse! sandbox). Things are fine till now. But I have another phone on which I installed the app (passing apk via email) on which I already have Uber app installed (and signed in). When I click on the Ride Button then it shows.

    This Image

    What's the reason for this?

  2. What's the difference between implicit grant and oauth2. Is oauth2 preferable or it gives more functionality? or is it the same? If oauth2 is preferable then Please! shed some information on 'redirect url'. Any samples will help me good!

    My use case is simple: I purely want to help the user book a ride on his behalf!

EDIT:

I have the following further questions

  1. When I use RideRequestWidget in the sandbox environment , it does NOT respect it. It simply deep links to my uber app (if installed) and I can actually book cabs.

  2. I am logged into my Uber account (in the uber app) installed on my phone with the same credentials registered for my developer account. So According to the docs when I click on the riderequestwidget then it should deeplink and show me the view so I can book the cabs. But it shows the error mentioned (in the screen above)

  3. If I sign out and then click on the widget so it deep links to the installed Uber app and I can practically enter 'ANY' ID (which is not registered to my developer's account) and it 'Logs me in'.

1
Pro tips: (1) remember that the uber-api tag on Stack Overflow is used mostly by people who do not work at Uber - readers may therefore be able to help you with general queries, but it is not an appropriate resource to address Uber technical support directly. Also (2) if you dump all your questions in one post, the applicability of your post to other readers drops dramatically, and your question is likely to be closed as "too broad". - halfer
So, if you want to offer feedback to Uber regarding how they offer technical support, send them an email, or use some other means to contact them - the general readership here cannot help you with that. - halfer
@halfer Cool.. Got it. Will try from next time. Also Uber don't provide any customer support email (atleast not mentioned on their site) . But advice taken. Also , Uber has SO and twitter for asking question. So very less ways to reach them you see - therealprashant
It looks like for non-tech questions, a Google Group is recommended (see Don't see the answer here?). I agree that doesn't sound ideal, but if that's all they offer... - halfer
Cool @halfer. Thanks alot - therealprashant

1 Answers

0
votes
  1. If the Uber App is installed, the Ride Request Widget will attempt to use Single Sign On to authorize the user. The authentication error could be any number of errors and you can check which by using onActivityResult and checking the intent extras for “authentication_error”. Most likely the error is you haven’t registered your application’s signature on the authorizations page of developer.uber.com. Check your logs for the application signature in an error, or generate it on your own via the instructions in the Login section of the Rides Android SDK README.

  2. Implicit Grant is a flow type for OAuth2. A redirect URL may be used by your backend to get an access token with different flows. For the purposes of Implicit Grant, as long as the redirect URL you have registered on the authorizations page matches what you have in the SDK it should work (you could even have).