androidgoogle-oauthandroid-7.0-nougataccountmanagergoogle-account

How to remove Google account from an app in kiosk mode?


We are working on an tablet app where users are given option to sign in their Google accounts and use these to access files stored on Google Drive. The tablets are locked in kiosk mode and multiple users are sharing the same tablet, therefore I need to find a way to provide users the option to remove their credentials once they are done.

The accounts are added/selected using GoogleSignInClient (https://developers.google.com/identity/sign-in/android/sign-in).

So far, I tried the following:

Is there any other way how to remove a Google account from within the app?


Solution

  • Eventually we resolved this using an intent to System account settings.

    Intent myIntent = new Intent(Settings.ACTION_SYNC_SETTINGS);
    startActivityForResult(myIntent, REQUEST_CODE_ACCOUNT_SETTINGS);