uber / uber/rides-android-sdk

Android Uber SDK Ride Estimate Returns Null Value

Open
#64 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
Java
Stars
293
Forks
132
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the RideEstimate request through RidesService with the native Uber app both unavailable and available. Compare the response from estimateRide in those two cases, including the ProductsResponse and RideEstimate calls shown in the issue. Done means identifying why the available-app case returns null and documenting or correcting that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.