Android 三星S7 Edge Google登录结果。isSuccess()始终为false
正如标题所说,目前我面临着三星S7 Edge的问题,我的客户说他无法登录。登录使用谷歌登录。首先,我认为这是因为安卓M,但事实并非如此(在使用荣誉5C测试应用程序后)。其他手机(安卓J、K和L)没有问题 因为我没有一个用于测试并在logcat中看到原因,是因为电话还是代码 在OnCreate中:Android 三星S7 Edge Google登录结果。isSuccess()始终为false,android,google-signin,galaxy,Android,Google Signin,Galaxy,正如标题所说,目前我面临着三星S7 Edge的问题,我的客户说他无法登录。登录使用谷歌登录。首先,我认为这是因为安卓M,但事实并非如此(在使用荣誉5C测试应用程序后)。其他手机(安卓J、K和L)没有问题 因为我没有一个用于测试并在logcat中看到原因,是因为电话还是代码 在OnCreate中: mGoogleApiClient = new GoogleApiClient.Builder(this) .enableAutoManage(this /* FragmentAc
mGoogleApiClient = new GoogleApiClient.Builder(this)
.enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)
.addApi(Auth.GOOGLE_SIGN_IN_API, gso)
.addScope(new Scope(Scopes.EMAIL))
.addScope(new Scope(Scopes.PROFILE))
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
当用户单击“登录”按钮时:
private void registerWithGoogle() {
Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);
startActivityForResult(signInIntent, RC_SIGN_IN);
mGoogleApiClient.connect();
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
//If signin
if (requestCode == RC_SIGN_IN) {
GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
//Calling a new function to handle signin
handleRegisterResult(result);
}
}
private void handleRegisterResult(GoogleSignInResult result) {
if (result.isSuccess()) {
//Getting google account
GoogleSignInAccount acct = result.getSignInAccount();
String name = acct.getDisplayName();
name = name.replace(" ", "%20");
String phoneNo = editTextPhoneNo.getText().toString();
phoneNo = phoneNo.replace("+", "%2B");
String email = acct.getEmail();
String code = textViewCode.getText().toString();
code = code.replace("+", "%2B");
registerUser(name,
phoneNo,
email,
code);
} else {
String msg = "Error when register";
snackBar(msg);
}
}
他注册时总是出现错误。还是有其他问题的原因