GoogleのサインインアクティビティをGoogleで開くことはできません。それは私のアプリケーションコードです。Googleによるサインインアクティビティーを開けません
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail()
.build();
mGoogleSignInClient = GoogleSignIn.getClient(this, gso);
SignInButton signInButton = findViewById(R.id.sign_in_button);
signInButton.setOnClickListener(view -> signIn());
private void signIn() {
Intent signInIntent = mGoogleSignInClient.getSignInIntent();
startActivityForResult(signInIntent, RC_SIGN_IN);
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == RC_SIGN_IN) {
Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);
handleSignInResult(task);
}
}
private void handleSignInResult(Task<GoogleSignInAccount> completedTask) {
try {
account = completedTask.getResult(ApiException.class);
} catch (ApiException e) {
Log.w("Err", "signInResult:failed code=" + e.getStatusCode());
}
}
私は901、1のような異なるRC_SIGN_INコードで試しましたが、解決策はありませんでした。
で、Googleの記号の後に移動したい活動に言及しますか? –
私は例外を取得しませんでした..アクティビティが表示され始め、その後消えます。 – user8549135
私はそれをデバッグし、まだ例外はありません – user8549135