无法在Google登录名上为Android选择其他帐户 [英] Unable to select different account on google login for android

查看:155
本文介绍了无法在Google登录名上为Android选择其他帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经实现了Android的Google签名应用.用户可以通过Google登录按钮成功登录.

I have implemented Google Signing for Android app. The user can successfully login from the Google Login Button.

选择社交帐户时出现此屏幕:因此,现在用户已经通过选择其帐户成功登录.

So now the user has logged in successfully by selecting his/her account.

现在,用户注销并尝试使用Google登录按钮再次登录.

Now, user logs out and tries to sign in again by using Google Login Button.

这时,不要求他选择帐户,而是使用首次选择的帐户自动登录.

At this time, he is not asked with the option to choose account , he is automatically logged in using the account he/she selected at the first time.

注销时,我应该怎么做才能清除所选帐户的缓存.

At the time of logout what should I do to clear the cache of selected account.

推荐答案

由于您未提供任何代码或未提供登录和注销方式的参考,因此可能是您错误地从应用中注销了用户.

As you didn't provide any code or reference how you are logging in and logging out, it might be that you incorrectly sign out user from the app.

因此,这是文档描述用户注销时应执行的操作: https://developers.google.com/identity/sign-in/android/断开连接

So here is what docs describe one should do on user logout: https://developers.google.com/identity/sign-in/android/disconnect

退出:

Auth.GoogleSignInApi.signOut(mGoogleApiClient).setResultCallback(
            new ResultCallback<Status>() {
                @Override
                public void onResult(Status status) {
                    // ...
                }
            });

注意:您必须先确认已调用GoogleApiClient.onConnected.

Note: You must confirm that GoogleApiClient.onConnected has been called before signing out.

还要检查onResult中附带的status-可能存在一些错误,可能会导致答案.

Also check status which comes in onResult - maybe there is some error, which might lead to the answer.

这篇关于无法在Google登录名上为Android选择其他帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆