Code Monkey home page Code Monkey logo

rides-android-sdk's Introduction

Uber Rides Android SDK (beta) Build Status

Official Android SDK to support:

  • Ride Request Button
  • Ride Request Deeplinks
  • Uber Authentication
  • REST APIs

At a minimum, this SDK is designed to work with Android SDK 15.

Before you begin

Before using this SDK, register your application on the Uber Developer Site.

Installation

To use the Uber Rides Android SDK, add the compile dependency with the latest version of the Uber SDK.

Gradle

Maven Central

dependencies {
    compile 'com.uber.sdk:rides-android:x.y.z'
}

SDK Configuration

In order for the SDK to function correctly, you need to add some information about your app. In your application, create a SessionConfiguration to use with the various components of the library. If you prefer the set it and forget it model, use the UberSdk class to initialize with a default SessionConfiguration.

SessionConfiguration config = new SessionConfiguration.Builder()
    .setClientId("YOUR_CLIENT_ID") //This is necessary
    .setRedirectUri("YOUR_REDIRECT_URI") //This is necessary if you'll be using implicit grant
    .setEnvironment(Environment.SANDBOX) //Useful for testing your app in the sandbox environment
    .setScopes(Arrays.asList(Scope.PROFILE, Scope.RIDE_WIDGETS)) //Your scopes for authentication here
    .build();

Ride Request Deeplink

The Ride Request Deeplink provides an easy to use method to provide ride functionality against the install Uber app or the mobile web experience.

Without any extra configuration, the RideRequestDeeplink will deeplink to the Uber app. We suggest passing additional parameters to make the Uber experience even more seamless for your users. For example, dropoff location parameters can be used to automatically pass the user’s destination information over to the driver:

RideParameters rideParams = new RideParameters.Builder()
  .setProductId("a1111c8c-c720-46c3-8534-2fcdd730040d")
  .setPickupLocation(37.775304, -122.417522, "Uber HQ", "1455 Market Street, San Francisco")
  .setDropoffLocation(37.795079, -122.4397805, "Embarcadero", "One Embarcadero Center, San Francisco")
  .build();
requestButton.setRideParameters(rideParams);

After configuring the Ride Parameters, pass them into the RideRequestDeeplink builder object to construct and execute the deeplink.

RideRequestDeeplink deeplink = new RideRequestDeeplink.Builder(context)
                        .setSessionConfiguration(config))
                        .setRideParameters(rideParameters)
                        .build();
                deeplink.execute();

Deeplink Fallbacks

The Ride Request Deeplink will prefer to use deferred deeplinking by default, where the user is taken to the Play Store to download the app, and then continue the deeplink behavior in the app after installation. However, an alternate fallback may be used to prefer the mobile web experience instead.

To prefer mobile web over an app installation, set the fallback on the builder:

RideRequestDeeplink deeplink = new RideRequestDeeplink.Builder(context)
                        .setSessionConfiguration(config)
                        .setFallback(Deeplink.Fallback.MOBILE_WEB)
                        .setRideParameters(rideParameters)
                        .build();
                deeplink.execute();

Ride Request Button

The RideRequestButton offers the quickest ways to integrate Uber into your application. You can add a Ride Request Button to your View like you would any other View:

RideRequestButton requestButton = new RideRequestButton(context);
layout.addView(requestButton);

This will create a request button with deeplinking behavior, with the pickup pin set to the user’s current location. The user will need to select a product and input additional information when they are switched over to the Uber application.

You can also add your button through XML:

<LinearLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:uber="http://schemas.android.com/apk/res-auto"
   android:layout_width="match_parent"
   android:layout_height="match_parent">

   <com.uber.sdk.android.rides.RideRequestButton
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      uber:ub__style="black"/>
</LinearLayout>

To use the uber XML namespace, be sure to add xmlns:uber="http://schemas.android.com/apk/res-auto" to your root view element.

Customization

The default color has a black background with white text:

<com.uber.sdk.android.rides.RideRequestButton
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"/>

For a button with a white background and black text:

<com.uber.sdk.android.rides.RideRequestButton
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      uber:ub__style="white"/>

To specify the mobile web deeplink fallback over app installation when using the RideRequestButton:

rideRequestButton.setDeeplinkFallback(Deeplink.Fallback.MOBILE_WEB);

With all the necessary parameters set, pressing the button will seamlessly prompt a ride request confirmation screen.

Ride Request Button with ETA and price

To further enhance the button with destination and price information, add a Session to it and call loadRideInformation() function.

RideParameters rideParams = new RideParameters.Builder()
  .setPickupLocation(37.775304, -122.417522, "Uber HQ", "1455 Market Street, San Francisco")
  .setDropoffLocation(37.795079, -122.4397805, "Embarcadero", "One Embarcadero Center, San Francisco") // Price estimate will only be provided if this is provided.
  .setProductId("a1111c8c-c720-46c3-8534-2fcdd730040d") // Optional. If not provided, the cheapest product will be used.
  .build();

SessionConfiguration config = new SessionConfiguration.Builder()
  .setClientId("YOUR_CLIENT_ID")
  .setServerToken("YOUR_SERVER_TOKEN")
  .build();
ServerTokenSession session = new ServerTokenSession(config);

RideRequestButtonCallback callback = new RideRequestButtonCallback() {

    @Override
    public void onRideInformationLoaded() {

    }

    @Override
    public void onError(ApiError apiError) {

    }

    @Override
    public void onError(Throwable throwable) {

    }
};

requestButton.setRideParameters(rideParams);
requestButton.setSession(session);
requestButton.setCallback(callback);
requestButton.loadRideInformation();

Custom Integration

If you want to provide a more custom experience in your app, there are a few classes to familiarize yourself with. Read the sections below and you'll be requesting rides in no time!

Login

Integration guide - Integrating a new client using Uber android authentication sdk
Migration guide - Upgrading an old integration (using version 0.10.X and below) to the new authentication sdk (version 2.X and above)

Making an API Request

The Android Uber SDK uses a dependency on the Java Uber SDK for API requests. After authentication is complete, create a Session to use the Uber API.

Session session = loginManager.getSession();

Now create an instance of the RidesService using the Session

RidesService service = UberRidesApi.with(session).createService();

Sync vs. Async Calls

Both synchronous and asynchronous calls work with the Uber Rides Java SDK. The networking stack for the Uber SDK is powered by Retrofit 2 and the same model of threading is available.

Sync

Response<UserProfile> response = service.getUserProfile().execute();
if (response.isSuccessful()) {
    //Success
    UserProfile profile = response.body();
} else {
    //Failure
    ApiError error = ErrorParser.parseError(response);
}

Async

service.getUserProfile().enqueue(new Callback<UserProfile>() {
    @Override
    public void onResponse(Call<UserProfile> call, Response<UserProfile> response) {
        if (response.isSuccessful()) {
            //Success
            UserProfile profile = response.body();
        } else {
            //Api Failure
            ApiError error = ErrorParser.parseError(response);
        }
    }

    @Override
    public void onFailure(Call<UserProfile> call, Throwable t) {
        //Network Failure
    }
});

Sample Apps

Sample apps can be found in the samples folder. Alternatively, you can also download a sample from the releases page.

The Sample apps require configuration parameters to interact with the Uber API, these include the client id, redirect uri, and server token. They are provided on the Uber developer dashboard.

Specify your configuration parameters in the sample's gradle.properties file, where examples can be found adhering to the format UBER_CLIENT_ID=insert_your_client_id_here. These are generated into the BuildConfig during compilation.

For a more idiomatic storage approach, define these in your home gradle.properties file to keep them out of the git repo.

~/.gradle/gradle.properties

UBER_CLIENT_ID=insert_your_client_id_here
UBER_REDIRECT_URI=insert_your_redirect_uri_here
UBER_SERVER_TOKEN=insert_your_server_token_here

To install the sample app from Android Studio, File > New > Import Project and select the extracted folder from the downloaded sample.

Getting help

Uber developers actively monitor the uber-api tag on StackOverflow. If you need help installing or using the library, you can ask a question there. Make sure to tag your question with uber-api and android!

For full documentation about our API, visit our Developer Site.

Contributing

We ❤️ contributions. Found a bug or looking for a new feature? Open an issue and we'll respond as fast as we can. Or, better yet, implement it yourself and open a pull request! We ask that you open an issue to discuss feature development prior to undertaking the work and that you include tests to show the bug was fixed or the feature works as expected.

MIT Licensed

rides-android-sdk's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rides-android-sdk's Issues

Gives 401 error by using a sample code

Hi team,

I used the provided sample code, the LoginActivity code where a method loadProfileInfo() is given. It makes login successful, but given error while fetching the user info.

Pls help.

Empty AndroidHttpClient get compiled when using core-android 0.5.4 leading to unresolved references to actual methods of AndroidHttpClient

Warning:com.whizdm.restclient.CoreClient: can't find referenced method 'long getMinGzipSize(android.content.ContentResolver)' in program class android.net.http.AndroidHttpClient
Warning:com.whizdm.restclient.CoreClient: can't find referenced method 'org.apache.http.entity.AbstractHttpEntity getCompressedEntity(byte[],android.content.ContentResolver)' in program class android.net.http.AndroidHttpClient
Warning:com.whizdm.restclient.CoreClient: can't find referenced method 'java.io.InputStream getUngzippedContent(org.apache.http.HttpEntity)' in program class android.net.http.AndroidHttpClient
Warning:there were 3 unresolved references to program class members.

implement Uber sdk with android project use compileSdkVersion less than 23

my android project compile using android sdk version 22 and I forced to upgrade my project's CompileSdkversion from 22 to 23 for using Uber sdk with it.

Even when I exclude appcompat-v7 module in build.gradle file

    compile ('com.uber.sdk:rides-android:0.5.1') {
        exclude module: 'appcompat-v7'
    }

uber sdk crash As RideRequestActivity.class use ContextCompat.checkSelfPermission and ActivityCompat.requestPermissions methods

java.lang.NoSuchMethodError: No static method checkSelfPermission(Landroid/content/Context;Ljava/lang/String;)I in class Landroid/support/v4/content/ContextCompat; or its super classes (declaration of 'android.support.v4.content.ContextCompat' appears in /data/data/com.yelllow.ubertest/files/instant-run/dex/slice-com.android.support-support-v4-22.2.0_08bdc58da7fbfec268d23acce14c9dbd98584614-classes.dex)
at com.uber.sdk.android.rides.RideRequestActivity.onCreate(RideRequestActivity.java:142)
at android.app.Activity.performCreate(Activity.java:6283)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)

Is there any way to use Uber sdk with compileSdkVersion less than 23 ??

Can't authorize our application on some devices.

Hi,

At my company, we are getting some errors while trying to authenticate using SSO. The weird thing is this error occurs only on some of our devices and not others.

More specifically, the activity provided by the uber app that handles the authorization always finishes immediately after being started. When it finishes, the bundle that it sends as a result contains sometimes {"ERROR": "unavailable"}, and some other times {"ERROR": "expired_jwt"}.

We seem to be able to reproduce this bug only on a handful of our devices :

  • An LG Nexus 4 running Android 5.1.1
  • A Samsung Galaxy S4 running Android 4.4.2

The problem can be reproduced using the login-sample app, and it seems it only happens when you request a privileged scope. In the sample app, if you tap on the button "sign in" button to the top or the "I want to sign in using my uber app" button at the bottom, your are shown the Uber login screen. However if you tap on the "sign in" button in the middle (which requests the request scope upon sign in), the problem that I've specified above occurs.

This is the code the we currently use to setup to login with uber sdk :

// in our application's OnCreate
SessionConfiguration config = new SessionConfiguration.Builder()
               .setClientId(UBER_CLIENT_ID)
               .setEnvironment(SessionConfiguration.Environment.SANDBOX)
               .setScopes(
                     Arrays.asList(Scope.PLACES, Scope.HISTORY,
                           Scope.REQUEST, Scope.REQUEST_RECEIPT))
               .build();
UberSdk.initialize(config);

...

// when the user requests to login
loginManager.login(activity);

We could reproduce the issue on the sandbox as well as on the production environment. Our application has already been granted full access.

The problem still occurs after a complete reinstall of both our app and the uber app.

The version of the uber application that we have installed is 3.123.2

Thank you in advance for your help, let me know if you need any more info.

"There was an error processing your request. Please try again."

Hi,
We are receiving an error(on UI, that says):
There was an error processing your request. Please try again.

I tried to debug it a little.. but the only issue came up is 404 on this request:
https://components.uber.com/api/places/reverse?lat=31.9**&lng=35.033*** (censored for privacy)

Android Uber SDK Ride Estimate Returns Null Value

I have been integrating Uber SDK with My Application and i am trying to get uber ride estimate with following code,

RidesService service = UberRidesApi.with(session).build().createService();
Response response = service.getProducts((float) currentLatLng.latitude, (float) currentLatLng.longitude).execute();
List products = response.body().getProducts();
rideDetails.setProducts((ArrayList) products);
if (products != null && products.size() > 0) {
for (int i = 0; i < products.size(); i++) {
Product product = products.get(i);
String productId = product.getProductId();
RideRequestParameters rideRequestParameters = new RideRequestParameters.Builder().setPickupCoordinates((float) currentLatLng.latitude, (float) currentLatLng.longitude)
.setProductId(productId)
.setDropoffCoordinates((float) mDestinationLatitude, (float) mDestinationLongitude)
.build();
RideEstimate rideEstimate = service.estimateRide(rideRequestParameters).execute().body();
}

            }

with this lines of code i am able to get the RideEstimate data's if the Native UBER app is not available but if its available i am getting the RideEstimate data as NULL. Please let me know if you could hel me in this.Thanks in advance.

How to call products, estimates/price and estimates/time endpoints

First I must thank for this awesome Uber SDK,

I need to integrate the uber endpoints in my app

as the above mentioned endpoints does't require any User authentication. Right?

how can I request these standalone API's with this sdk without authentication?

Sample app BuildConfig variable update

In the sample app for the ride request button, more specifically in the file SampleActivity.java, we access properties that are defined in the gradle.properties using:

private static final String CLIENT_ID = BuildConfig.CLIENT_ID;
private static final String REDIRECT_URI = BuildConfig.REDIRECT_URI;
private static final String SERVER_TOKEN = BuildConfig.SERVER_TOKEN;

The property names, however, seem to be different in the gradle.properties file itself:

description=Ride Request Button Sample
UBER_CLIENT_ID=insert_your_client_id_here
UBER_REDIRECT_URI=insert_your_redirect_uri_here
UBER_SERVER_TOKEN=insert_your_server_token_here

We should update the names, correct? :)

UPDATE: I was wrong, the prop name is chnaged during build within the build.gradle file:

    defaultConfig {
        applicationId "com.uber.sdk.android.rides.samples"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        buildConfigField "String", "CLIENT_ID", "\"${loadSecret("UBER_CLIENT_ID")}\"" //Add your client id to gradle.properties
        buildConfigField "String", "REDIRECT_URI", "\"${loadSecret("UBER_REDIRECT_URI")}\"" //Add your redirect uri to gradle.properties
        buildConfigField "String", "SERVER_TOKEN", "\"${loadSecret("UBER_SERVER_TOKEN")}\"" //Add your server token to gradle.properties
    }

The ride request is always processing

Polling the Uber API to get the current status every 4 seconds,I always get the response :
{ “status":"processing", "product_id":"...", "request_id":"...", "driver":null, "eta":null, "location":null, "vehicle":null, "surge_multiplier":1.0, "shared":false}
The status is always processing. I failed to solve it . Can you help me ?

Is loginWithScopes() method deprecated?

Could not find the aforementioned method. I am using 'com.uber.sdk:rides-android:0.5.3'. I am performing a custom integration of login where the login page is shown but the scopes are not shown to the user.

Ride Request Widget Issue

So a dialog keeps showing that says The Ride Request Widget encountered a problem. It has two buttons CANCEL and TRY AGAIN. My pick up location is in Los Angeles and the drop off location is in Las Vegas. What is causing this dialog to show? I am able to view the Request Widget if both my pick up and drop off location are in Los Angeles.

Webpage not available

So I am trying to use the RideRequest button without having the Uber app installed. It opened the web login screen where entered my login details and then Webpage not available showed up. Attached is the screenshot of the error. What might I be doing wrong?

Details of my implementation,my Fragment implements RideRequestButtonCallback but I don't get any errors logged though.

configuration = new SessionConfiguration.Builder()
.setRedirectUri(REDIRECT_URI)
.setClientId(CLIENT_ID)
.setServerToken(SERVER_TOKEN)
.setScopes(Arrays.asList(Scope.RIDE_WIDGETS))
.setEnvironment(SessionConfiguration.Environment.SANDBOX)
.build();
UberSdk.initialize(configuration);

    ServerTokenSession session = new ServerTokenSession(configuration);
    RideParameters rideParametersCheapestProduct = new RideParameters.Builder()
            .setPickupLocation(PICKUP_LAT, PICKUP_LONG, PICKUP_NICK, null)
            .setDropoffLocation(DROP_LAT, DROP_LONG,DROP_NICK, null)
            .build();

    RideRequestButton uberButton = (RideRequestButton) v.findViewById(R.id.btnUber);
    RideRequestActivityBehavior rideRequestActivityBehavior = new RideRequestActivityBehavior(getActivity(),
            WIDGET_REQUEST_CODE, configuration);
    uberButton.setRequestBehavior(rideRequestActivityBehavior);
    uberButton.setRideParameters(rideParametersCheapestProduct);
    uberButton.setSession(session);
    uberButton.loadRideInformation();
    uberButton.setCallback(this);

screenshot_2016-11-06-00-17-47 1

The uri generated by the class RequestDeeplink is encoded

Hello,

I've tried to use ReuqestDeeplink class of the SDK to launch Uber application with parameters, but i found that the generated uri is encoded.

For example:
uber:?action=setPickup&client_id=OuIucGjvQ8F6rfluPyopzdazZihlaGdT&pickup%5Blatitude%5D=48.80373&pickup%5Blongitude%5D=2.2957778&dropoff%5Blatitude%5D=48.86018&dropoff%5Blongitude%5D=2.350931&dropoff%5Bformatted_address%5D=Place%20Georges%20POMPIDOU%20%2075004%20PARIS%2004&user-agent=rides-deeplink-v0.2.0

Well, the correct uri should be like :
uber://?client_id=YOUR_CLIENT_ID&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

Ride Request Button Customization

I want to customize the text of the Uber Ride Request Button specifically increase the text size. I tried android:textSize="" but was not successful. Any kind of help is appreciated.

Thank You in advance

SessionConfiguration.Environment.SANDBOX explanation

If I called setEnvironment(SessionConfiguration.Environment.SANDBOX), what exactly does that mean? Does it mean that an actual Uber ride will NOT be requested?

I have called

uberButton.setRequestBehavior(new RideRequestActivityBehavior(getActivity(), REQUEST_UBER_REQUEST_CODE));

If I request an Uber in Sandbox mode, will it come back to the onActivityResult() callback method with resultCode == Activity.RESULT_OK?

Maybe you could spell this out in your README, unless you explain it somewhere else.

Update Uber badge style

Recently Uber change their branding colours and icons. So it will be cool if someone upload new icons to SDK.

Multiple warnings "Ignoring InnerClasses attribute for an anonymous inner class" when building project

After adding this lib to one of the projects I work with I'm facing more than 500 warnings when building the project. It seems it has to do with Log4J as you can see below.

Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(org.apache.log4j.chainsaw.ControlPanel$1) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is *not* an inner class.
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(org.apache.log4j.chainsaw.ControlPanel$2) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is *not* an inner class.
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(org.apache.log4j.chainsaw.ControlPanel$3) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is *not* an inner class.
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(org.apache.log4j.chainsaw.ControlPanel$4) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is *not* an inner class.

Uber Rides SDK is the only lib I have on my project which has Log4J as a dependency, according to what I see when I run ./gradlew app:dependencies.

I've tried to add these rules to the Proguard file, though it didn't work:

-keepattributes InnerClasses
-keepattributes EnclosingMethod
-dontoptimize

By now I'm removing the Rides SDK from my project, since apparently there's nothing I can do from my side to suppress all these warning messages.

If you need more info, just let me know.

Javadoc

Is there javadoc hosted somewhere for reference?

Login redirection problem

I've encountered an issue with authentication flow.

  1. Uber app is installed on the device
  2. Start SSO flow from third party app with REQUEST scope and redirection URL in Uber dashboard "http://localhost"
  3. User app show login and registration possibilities
  4. User tap on login button
  5. And login through G+ account
  6. User is redirect to home screen of Uber app
  • After G+ login user should be redirected to scope confirmation view then to third party app but this is not happening.

Ride Estimate not getting fetched on RideRequestButton

While setting RideParameters object, I set rideParams.setPickupToMyLocation() to avail the benefit of getting estimate from current device location to given drop off location, but the estimate is not getting refreshed.

Sign Up issue on ride request widget

While signing up for Uber in widget with cash payment, it is not verifying phone number.
Please check. Widget version is "com.uber.sdk:rides-android:0.3.2"

WebPage Not Available

On login i facing this issue how to resolve this

SessionConfiguration configuration = new SessionConfiguration.Builder()
            .setClientId("<>")
            .setRedirectUri("zippcab://ZippCab")
            .setServerToken("<>")
            .setClientSecret("<>")
            .setEnvironment(SessionConfiguration.Environment.PRODUCTION)
            .setEndpointRegion(SessionConfiguration.EndpointRegion.WORLD)
            .setScopes(Arrays.asList(Scope.PROFILE, Scope.REQUEST))
            .build();

    UberSdk.initialize(configuration);

accessTokenManager = new AccessTokenManager(berLogin.this);

    mUberLoginManager = new LoginManager(accessTokenManager,
            new SampleLoginCallback(),
            configuration,
            1);

    mUberLoginManager.loginForAuthorizationCode(berLogin.this);

    mUberLoginManager.setRedirectForAuthorizationCode(true);

unnamed-1

log4j lib still exists in 0.5.3 causing Proguard failing

+--- com.uber.sdk:rides-android:0.5.3
|    +--- com.android.support:appcompat-v7:23.0.1 -> 24.2.0 (*)
|    \--- com.uber.sdk:core-android:0.5.3
|         +--- com.android.support:appcompat-v7:23.0.1 -> 24.2.0 (*)
|         +--- com.google.code.findbugs:jsr305:1.3.9
|         \--- com.uber.sdk:rides:0.5.2
|              +--- com.squareup.okhttp3:logging-interceptor:3.2.0
|              |    \--- com.squareup.okhttp3:okhttp:3.2.0 (*)
|              +--- org.slf4j:slf4j-log4j12:1.7.5
|              |    +--- org.slf4j:slf4j-api:1.7.5
|              |    \--- log4j:log4j:1.2.17

#31

How to get all products at given geo location

  1. How I can iterate all available products at given geo location using this sdk?Import all module in android studio. Is there any addition dependency do I need to add?
  2. Also getting 'Auth error INVALID_APP_SINGNATURE' in request ride example. How to resolve this?

Issue in ride request widget sdk for android

Bug relates to ride request widget which has just been introduced by uber.

I am able to book cab, but when trying to call/message driver I am getting following error:

ERR_UNKNOWN_URL_SCHEME

Error: Attribute "style" has already been defined

I have compile uber sdk on my project, but I found this issue

"Attribute "style" has already been defined" in color.xml. I dont have anything attribute named "style" on my own color.xml. So, what should I do to fix this issue?

Thank you

SSO won't work after reinstall Uber app

Phone Model: Nexus 5
Steps to replicate:
1 Uninstall and reinstall uber app
2 Try SSO from third party app

SsoDeeplink ssoDeeplink = new SsoDeeplink.Builder(activity)
                .clientId(sessionConfiguration.getClientId())
                .region(sessionConfiguration.getEndpointRegion())
                .scopes(sessionConfiguration.getScopes())
                .customScopes(sessionConfiguration.getCustomScopes())
                .activityRequestCode(requestCode)
                .build();
        if (ssoDeeplink.isSupported()) {
            ssoDeeplink.execute();
        }

3 The login form pop up, instead of showing the scope grant screen
4 After rebooting phone, SSO works fine again.

Plugin with id 'cobertura' not found while adding sdk as module

I am getting error

Error:(5, 0) Plugin with id 'cobertura' not found

if i add the sdk as module in project rather than dependency because i want to update design of Ride Request Button.How can i resolve this and is there any way to update text Colour of Ride Request Button if i add sdk directly as gradle dependency rather than module?

Typo in Readme.md

look at this line
requestButton.setCallback(callback));
there is an extra closing bracket.

Unable to customize RideRequestButton text size

In small screens, the given RideRequestButton has UI glitches: Text is so big, button is huge...
I really recommend letting developers customize the button label, estimate and price text size.

Here is a proposal to fix this:
#35

screenshot_2016-07-09-22-46-58

Android Studio preview not working

Error Failed to find style 'uberButtonStyle' in current theme

Code used:

                <com.uber.sdk.android.rides.RequestButton
                    android:id="@+id/uber_button"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    uber:style="white" />

Documentation Error in section Adding Parameters

Kindly take a look at this LOC and try to change it at the earliest ...
In Adding Parameters
RequestButton requestButton = RequestButton(context);

change it to -
RequestButton requestButton = new RequestButton(context);
Hope this gets corrected ASAP.

Unable to signup in widget

Hi,

We are currently implementing Uber integration using the Android widget in our app, and we noticed it's not possible to signup from inside the widget. After filling out the signup form, the Create Account button remains greyed out. We suspect this is caused by the fact that the selected country code for the mobile number isn't actually set to the drop down field.

screenshot_2016-05-11-12-26-05

Reproduced on a Nexus 4 and an LG G5, in both our own app and in the sample app, both sandbox enabled and disabled. Please let me know if you need any more information.

Arne

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.