uber / rides-android-sdk

Uber Rides Android SDK (beta)
https://developer.uber.com/docs
MIT License
291 stars 124 forks source link

Access to Information page does not work #69

Open tengfeili0814 opened 7 years ago

tengfeili0814 commented 7 years ago

I can see the "Access to Information" page after calling login(Activity activity). But it always returns loginCancel() callback although I clicked "Allow" button.

hanjunx commented 7 years ago

sg

On Jan 27, 2017 4:12 PM, "TengFei Li" notifications@github.com wrote:

I can see the "Access to Information" page after calling login(Activity activity). But it always returns loginCancel() callback although I clicked "Allow" button.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/uber/rides-android-sdk/issues/69, or mute the thread https://github.com/notifications/unsubscribe-auth/ACW3y-I5x-QXnpmXv23HQPkWb_cE8ZPvks5rWabxgaJpZM4LvhNP .

itstexter commented 7 years ago

When you say it always returns the loginCancel callback it looks like the only place loginCancel is being called is when the returning data is null, so there must be some bug where the intent's data is null.

Could you provide a code snippet of your integration? Including what scopes you're asking for, how you set up your manager, etc.

hanjunx commented 7 years ago

sgtm

Hanjun

On Sat, Jan 28, 2017 at 7:09 AM, Alex Texter notifications@github.com wrote:

When you say it always returns the loginCancel callback it looks like the only place loginCancel is being called is when the returning data is null, so there must be some bug where the intent's data is null.

Could you provide a code snippet of your integration? Including what scopes you're asking for, how you set up your manager, etc.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/uber/rides-android-sdk/issues/69#issuecomment-275799541, or mute the thread https://github.com/notifications/unsubscribe-auth/ACW3ywLGkx_FxZUmQwGMRu97E3qtS7r4ks5rWnk_gaJpZM4LvhNP .

tengfeili0814 commented 7 years ago

Thanks for your reply. Here is the code for it. SessionConfiguration config = new SessionConfiguration.Builder() .setClientId(UBER_CLIENT_ID) .setRedirectUri(UBER_REDIRECT_URI) .setEnvironment(SessionConfiguration.Environment.SANDBOX) .setScopes(Arrays.asList(Scope.PROFILE, Scope.RIDE_WIDGETS, Scope.ALL_TRIPS)) .build(); UberSdk.initialize(config); I received the full access of all_trips from Uber development team. And I called the login activity like this. AccessTokenManager accessTokenManager = new AccessTokenManager(getContext()); loginManager = new LoginManager(accessTokenManager,loginCallback,UberSdk.getDefaultSessionConfiguration(), ACTION_REQUEST_UBER_AUTHORIZATION); loginManager.login(getActivity());

But always returns loginCancel. Looking forward to hearing from you.