1

I have Integrated the Google SignIn in android application When application launch first time and the user clicks on Google button it shows a list of account which is logged in devices.

If the user selects First account user able to get into the application but If I close the application and reopen and clicks on Google button it doesn't show List of accounts.

I want the application to show a list of account each time when a user clicks on the button.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Ext1 Dev
  • 33
  • 2
  • 6
  • 2
    [how to clear selected google account once logged in](https://stackoverflow.com/a/46504733/5990846) – Jay Nov 13 '18 at 12:04
  • Try this - https://stackoverflow.com/questions/24227274/how-to-add-programmatically-a-custom-account-in-android – Asteroid Nov 13 '18 at 12:12

1 Answers1

0

You can Sign out with the google method.

If you disconnect the User before Sign in you will show the list of accounts.

private void signOut() {
    mGoogleSignInClient.signOut()
            .addOnCompleteListener(this, new OnCompleteListener<Void>() {
                @Override
                public void onComplete(@NonNull Task<Void> task) {
                    // ...
                }
            });
}

Don't forget to test before if an user is already connected

Thibault
  • 1
  • 3