uber / uber/rides-android-sdk

Showing error while implementing deeplink for mobile web for uber sdk version 0.9.1

Open
#124 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Github issues are for bug reports. If this is a question around usage or understanding please use
Stack Overflow. https://stackoverflow.com/questions/tagged/uber-api

Library version:0.9.1

Repro steps, stacktrace, screenshots:
android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?

Expected Behavior:
need m.uber.com opend within app

  SessionConfiguration config = new SessionConfiguration.Builder()
            .setClientId(XXXXXX") //This is necessary
          //  .setRedirectUri("YOUR_REDIRECT_URI") //This is necessary if you'll be using implicit grant
            .setEnvironment(SessionConfiguration.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();

    RideRequestButton requestButton = new RideRequestButton(context);
    layout_main.addView(requestButton);
    RideParameters rideParams = new RideParameters.Builder()
            .setProductId("xxxxx")
            .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);

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

what the reason behind it..?

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 reported exception with RideRequestDeeplink.Builder(context) and deeplink.execute() using SDK version 0.9.1. Check whether the supplied context is an Activity context and compare the behavior with the expected opening of m.uber.com within the app. Done means the deeplink no longer throws the reported AndroidRuntimeException.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.