Hardik Parsania

I am mobile app developer. I am always passionate about solving complex and real world problems.I have developed many apps with great interest and superior logical skills.

You may also like...

14 Responses

  1. Steve says:

    Good work, specially a logout demonstration helped a lot. It is difficult to find logout demo along with login demo on internet.

  2. krunal patel says:

    I try this code bt when click on logout button its only display Toast box then how i that user will be successfully logout from application?

    • Hardik Parsania says:

      this is logout buttons onclick method
      btn.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View v) {
      Auth.GoogleSignInApi.signOut(mGoogleApiClient).setResultCallback(
      new ResultCallback() {
      @Override
      public void onResult(Status status) {
      Toast.makeText(MainActivity.this, “Logout Successfully!”, Toast.LENGTH_SHORT).show();
      }
      });
      }
      });

      check it carefully, it first logout user then shows toast. If user is logout and then he clicks on sign in button, app will ask him to choose google account. If user is login already then app does not ask for choosing account and directly fetches name, email etc info. You check this scenario in output video as well.

  3. vishal says:

    how to maintain a session using google plus login.

  4. rahul says:

    i want to login gmail entering username and password manually in android please help me

  5. Dilip kumar says:

    i m getting error on plus and person how to solve this???????????

  6. Abhishek phalke says:

    if login is successful how to name and image show in textview and imageview in next activity in textview show user name and user image show in image view but in next activity please help me ?

    • Hardik Parsania says:

      String name = acct.getDisplayName();
      You can use above string variable to send name in nextactivity
      acct.getPhotoUrl().toString() // use this line to get uri of photo in string variable and use this string variable to pass in next activity.
      Both coding lines are from handleSignInResult() method.

  7. Gunawan says:

    Hi,
    thanks for the code. But, what should I check if i always get “login failed”?

  8. CATawde says:

    Hello Sir, nice tutorial..Thanks..

    1) Yesterday I come across website:’https://developers.google.c… where they have mentioned ” The Google+ Sign-in feature is fully deprecated and is being shut down on March 7, 2019.
    Developers should migrate to the more comprehensive Google Sign-in authentication system.”..
    May i know exact what code change need to do if I am following above example and it would be great if you can share example article as well..

    2) Also for google sign in is it like either need to use google services json file or provide client id in
    ( .requestIdToken(getString(R.string.server_client_id))) method..

    Thanks.

  9. CATawde says:

    Hello Sir, nice tutorial..Thanks..

    1) Yesterday I come across website:’https://developers.google.c… where they have mentioned ” The Google+ Sign-in feature is fully deprecated and is being shut down on March 7, 2019.
    Developers should migrate to the more comprehensive Google Sign-in authentication system.”..
    May i know exact what code change need to do if I am following above example and it would be great if you can share example article as well..

    2) Also for google sign in is it like either need to use google services json file or provide client id in
    ( .requestIdToken(getString(R.string.server_client_id))) method?

    Thanks.Hello Sir, nice tutorial..Thanks..

    1) Yesterday I come across website:’https://developers.google.c… where they have mentioned ” The Google+ Sign-in feature is fully deprecated and is being shut down on March 7, 2019.
    Developers should migrate to the more comprehensive Google Sign-in authentication system.”..
    May i know exact what code change need to do if I am following above example and it would be great if you can share example article as well..

    2) Also for google sign in is it like either need to use google services json file or provide client id in
    ( .requestIdToken(getString(R.string.server_client_id))) method?

    Thanks.Hello Sir, nice tutorial..Thanks..

    1) Yesterday I come across website:’https://developers.google.c… where they have mentioned ” The Google+ Sign-in feature is fully deprecated and is being shut down on March 7, 2019.
    Developers should migrate to the more comprehensive Google Sign-in authentication system.”..
    May i know exact what code change need to do if I am following above example and it would be great if you can share example article as well..

    2) Also for google sign in is it like either need to use google services json file or provide client id in
    ( .requestIdToken(getString(R.string.server_client_id))) method?

    Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *