title: Google Sign In Android requestTokenId
body: <p>I am trying to sign in with Google. when I am not using the requestTokenId it's working fine, but when I am using, I'm not able to login.</p>
  
  <p>LOGCAT:</p>
  
  <pre><code>D/GoogleLoginCallBackHand: handleSignInResult:false
  
  D/GoogleLoginCallBackHand: handleSignInResult:12500:null
  </code></pre>
  
  <p>getting the same issue on emulator and every version of device.</p>
  
  <p>public class LoginFragment extends Fragment {</p>
  
  <pre><code>// Communicator object to communicate with word outside this Fragment
  // Fragments relies on host activity to communicate to outside world
  // Hence the host activity should set it
  Communicator communicator;
  
  // Google Sign
  public SignInButton googleLoginButton;
  private GoogleApiClient mGoogleApiClient;
  private GoogleLoginCallBackHandler googleLoginCallBackHandler;
  
  //Boolean Variable to track if user is trying to loginWith Google
  private boolean mResolvingError = false;
  
  public LoginFragment(){
  
  }
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setUpGoogleLogin();
  }
  
  private void setUpGoogleLogin() {
      GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
              .requestEmail()
              .requestIdToken("876227381632-k7dittplmjrhechqr0fr7dk3ro8frrte.apps.googleusercontent.com")
              .build();
      googleLoginCallBackHandler = new GoogleLoginCallBackHandler(this);
      mGoogleApiClient = new GoogleApiClient.Builder(getActivity())
              .enableAutoManage(getActivity(), googleLoginCallBackHandler)
              .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
              .build();
  }
  
  @Override
  public void onStart() {
      super.onStart();
      super.onStart();
      if (!mResolvingError) {  // more about this later
          mGoogleApiClient.connect();
      }
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
      return inflater.inflate(R.layout.fragment_login, container, false);
  }
  
  
  @Override
  public void onViewCreated(View view, Bundle savedInstanceState) {
      super.onViewCreated(view, savedInstanceState);
  
      // Google Login Call back set up
      googleLoginButton = (SignInButton)view.findViewById(ViewIds.GOOGLE_SIGNIN_BUTTON.getId());
      googleLoginButton.setOnClickListener(googleLoginCallBackHandler);
  }
  
  @Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
  
      // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);
      if (requestCode == googleLoginCallBackHandler.getRcSignIn()) {
          GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
          googleLoginCallBackHandler.handleSignInResult(result);
      }
  }
  
  @Override
  public void onResume() {
      super.onResume();
  }
  
  @Override
  public void onStop() {
      if (mGoogleApiClient.isConnected()) {
          mGoogleApiClient.disconnect();
      }
      super.onStop();
  }
  
  public GoogleApiClient getmGoogleApiClient() {
      return mGoogleApiClient;
  }
  
  public boolean ismResolvingError() {
      return mResolvingError;
  }
  
  public void setmResolvingError(boolean mResolvingError) {
      this.mResolvingError = mResolvingError;
  }
  
  
  /**
   * Interface object to communicate with parent activity
   * Fragments relies on host activity to communicate to outside world
   * Hence the host activity should implement this interface
   */
  
  public interface Communicator{
      void communicate();
  }
  
  public void setCommunicator(Communicator communicator){
      this.communicator = communicator;
  }
  </code></pre>
  
  <p>}</p>