java – Eclipse Sign-In for Android not starting login activity


When launching the application in Eclipse, the GoogleSignInClient is initialized:

    GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
mGoogleSignInClient = GoogleSignIn.getClient(this, gso); 

further in the button click handler I try to connect

Intent signInIntent = mGoogleSignInClient.getSignInIntent(); 

startActivityForResult(signInIntent, RC_SIGN_IN); 

At first, it swore that no activity was declared in the manifest. He added, as he asked in the manifest, the activity that he was missing, with the following name:

android: name = ""

Now, after pressing the button, nothing happens at all.


Override the onActivityResult method and add the following code:

if (requestCode == RC_SIGN_IN) {
  Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);
Scroll to Top