Android Uber SDK Ride Estimate Returns Null Value
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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