我收到了身份验证错误" CONNECTIVITY_ISSUE
"当我尝试在沙盒模式下使用android sdk LoginManager登录时。
SessionConfiguration config = new SessionConfiguration.Builder()
.setClientId(Constants.UBER_CLIENTID)
.setEnvironment(SessionConfiguration.Environment.SANDBOX)
.setScopes(Arrays.asList(Scope.PROFILE, Scope.RIDE_WIDGETS,Scope.REQUEST))
.build();
UberSdk.initialize(config);
accessTokenManager = new AccessTokenManager(this);
LoginCallback loginCallback = new LoginCallback() {
@Override
public void onLoginCancel() {
}
@Override
public void onLoginError(@NonNull AuthenticationError error) {
}
@Override
public void onLoginSuccess(@NonNull AccessToken accessToken) {
}
@Override
public void onAuthorizationCodeReceived(@NonNull String authorizationCode) {
authorizationCode=authorizationCode;
}
};
loginManager = new LoginManager(accessTokenManager, loginCallback);
if (accessTokenManager.getAccessToken() == null) {
loginManager.setRedirectForAuthorizationCode(true);
loginManager.login(this);
}
我已经关注了uber开发人员文档,但我无法解决此错误。任何人都可以帮我吗?
答案 0 :(得分:0)