title: Google Sign In error: Status Code: SIGN_IN_REQUIRED when signing in with Google on android
body: <p>Everytime I try to login with Google API, I get the following error. My manifest has the appropriate permissions and I did create my credentials accordingly. So I don't know what the problem is. The consent screen doesn't show either.</p>
  
  <pre><code>com.omer.notetoself D/NTS:﹕ ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{3678d5c: android.os.BinderProxy@19bcbe30}, message=null}
  </code></pre>
  
  <hr>
  
  <pre><code>  package com.omer.notetoself;
  
      import android.app.Activity;
      import android.content.Intent;
      import android.content.IntentSender;
      import android.os.Bundle;
      import android.util.Log;
      import android.view.Menu;
      import android.view.MenuItem;
      import android.view.View;
      import android.widget.Button;
      import android.widget.EditText;
  
      import com.google.android.gms.common.ConnectionResult;
      import com.google.android.gms.common.Scopes;
      import com.google.android.gms.common.api.GoogleApiClient;
      import com.google.android.gms.common.api.Scope;
      import com.google.android.gms.plus.Plus;
  
  
       `public class Activity_Login extends Activity implements View.OnClickListener,GoogleApiClient.ConnectionCallbacks,
          GoogleApiClient.OnConnectionFailedListener{` 
  
  
      private static final int RC_SIGN_IN = 0;
      private GoogleApiClient mGoogleApiClient;
      /* Is there a ConnectionResult resolution in progress? */
      private boolean mIsResolving = false;
  
      /* Should we automatically resolve ConnectionResults when possible? */
      private boolean mShouldResolve = false;
  
  
      EditText editText_userName;
      EditText editText_password;
  
      Button button_facebook_login;
      Button button_google_login;
      Button button_login;
      Button button_signUp;
  
      String userName;
      String password;
  
      @Override
      protected void onStop() {
          super.onStop();
          mGoogleApiClient.disconnect();
      }
  
      @Override
      protected void onStart() {
          super.onStart();
          mGoogleApiClient.connect();
      }
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_login);
  
          editText_userName = (EditText)findViewById(R.id.editText_username);
          editText_password = (EditText)findViewById(R.id.editText_password);
          button_login = (Button)findViewById(R.id.button_login);
          button_facebook_login = (Button)findViewById(R.id.button_facebook);
          button_google_login = (Button)findViewById(R.id.button_google);
  
          button_signUp = (Button)findViewById(R.id.button_signup);
          button_login.setOnClickListener(this);
          button_signUp.setOnClickListener(this);
          button_facebook_login.setOnClickListener(this);
          button_google_login.setOnClickListener(this);
  
  
          //GOOGLE+ API
  
          mGoogleApiClient = new GoogleApiClient.Builder(this)
                  .addConnectionCallbacks(this)
                  .addOnConnectionFailedListener(this)
                  .addApi(Plus.API)
                  .addScope(new Scope(Scopes.PROFILE))
                  .addScope(new Scope(Scopes.EMAIL))
                  .build();
      }
  
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.menu_activity_login, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          // Handle action bar item clicks here. The action bar will
          // automatically handle clicks on the Home/Up button, so long
          // as you specify a parent activity in AndroidManifest.xml.
          int id = item.getItemId();
  
          //noinspection SimplifiableIfStatement
          if (id == R.id.action_settings) {
              return true;
          }
  
          return super.onOptionsItemSelected(item);
      }
  
      @Override
      public void onClick(View v) {
          switch(v.getId()){
              case R.id.button_login: //AUTHENTICATE PARSE
                  userName = editText_userName.getText().toString().trim();
                  password = editText_password.getText().toString().trim();
                  AppUtilities.parseLogin(this, userName, password);
                  break;
              case R.id.button_signup: //LAUNCH SIGN UP ACTIVITY
                  Intent intent = new Intent(
                          Activity_Login.this,
                          Activity_SignUp.class);
                  startActivity(intent);
                  break;
              case R.id.button_facebook:
  
                  AppUtilities.facebookLogin(this);
                  break;
              case R.id.button_google:
                  initGoogle();
  
  
  
                  break;
  
          }
  
      }
  
      public void initGoogle(){
          mGoogleApiClient.connect();
      }
  
      @Override
      public void onConnected(Bundle bundle) {
          String email = Plus.AccountApi.getAccountName(mGoogleApiClient);
          AppUtilities.googleLogin(this,email);
      }
  
      @Override
      public void onConnectionSuspended(int i) {
  
      }
  
      @Override
      public void onConnectionFailed(ConnectionResult connectionResult) {
          AppUtilities.log(connectionResult.toString());
  
  
          if (!mIsResolving &amp;&amp; mShouldResolve) {
              if (connectionResult.hasResolution()) {
                  try {
                      connectionResult.startResolutionForResult(this, RC_SIGN_IN);
                      mIsResolving = true;
                  } catch (IntentSender.SendIntentException e) {
                      Log.e(AppUtilities.TAG, "Could not resolve ConnectionResult.", e);
                      mIsResolving = false;
                      mGoogleApiClient.connect();
                  }
              } else {
                  // Could not resolve the connection result, show the user an
                  // error dialog.
                  //showErrorDialog(connectionResult);
              }
          } else {
              // Show the signed-out UI
              //showSignedOutUI();
          }
      }
  }
  </code></pre>