简体   繁体   中英

Google plus SSO sign out functionality in android app

I know how to perform action on for SSO using Google Plus in android. I am successfully able to login app using same.

Now I need to log out user so that he/ she can log in app again using Google plus with a new account. I need to do same in another activity.

I have tried using disconnect() method but with no success.

Any help on this is appreciated.

You can find in the docs how to sign out the user. The relevant part is this:

if (mGoogleApiClient.isConnected()) {
      Plus.AccountApi.clearDefaultAccount(mGoogleApiClient);
      mGoogleApiClient.disconnect();
      mGoogleApiClient.connect();
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM