我正在开发使用 google Auth2.0 和 android 帐户管理器登录的应用程序。我成功登录并使用不同的 API 从我的谷歌获取数据,但我不知道如何从我的应用程序中注销以及何时注销想要再次显示登录屏幕。
最佳答案
我不认为你可以注销,你将不得不再次显示 AccountChooser
尝试
Intent intent = AccountPicker.newChooseAccountIntent(null, null, new String[] {"com.google"}, false, null, null, null, null);
startActivityForResult(intent, SOME_REQUEST_CODE);
关于java - 如何从 android 中的 google 帐户注销?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21519758/