Stay organized with collections
Save and categorize content based on your preferences.
You can enable your users to sign out of your app, and to disconnect their
accounts from your app entirely.
Sign out users
To add a sign out button to your app, first create a button in your app to act
as your sign out button. Then, attach an
onClickListener
to the button and configure the onClick method to call
signOut.
This code clears which account is connected to the app. To sign in again, the
user must choose their account again.
Disconnect accounts
It is highly recommended that you provide users that signed in with Google the
ability to disconnect their Google account from your app. If the user deletes
their account, you must delete the information that your app obtained from the
Google APIs.
The following code shows a simple example of calling the
revokeAccess
method:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["Google Sign-In for Android is outdated and developers should migrate to Credential Manager for enhanced security and user experience, except for Wear OS 3, 4, and 5.0 which need to continue using Google Sign-In for Android."],["Developers can implement sign-out functionality in their apps, requiring users to re-select their account for subsequent sign-ins."],["It is crucial for developers to allow users to disconnect their Google accounts from the app, and delete user data if the user deletes their Google account."]]],[]]