如何从Google+的帐户注销? [英] How to logout from Google+ Account?

查看:174
本文介绍了如何从Google+的帐户注销?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个Android应用程序与谷歌,加上签到完毕后。

After signin up with Google plus on an Android app.

我怎么能注销,这样我就可以使用其他帐户登录。

How can I logout, so I can sign in with another account.

不知道 GoogleAuthUtil.invalidateToken 就是答案或不...

Don't know if GoogleAuthUtil.invalidateToken is the answer or not...

感谢

推荐答案

如果您使用的是登入Google+ (你应该 - 工作流程要好得多,无论是对开发者和用户),那么你可以通过下面的的导的例子的:

If you are using Google+ sign in (and you should - the work flow is much better, both for developers and users), then you can sign out the user by following the guide's example:

@Override
public void onClick(View view) {
    if (view.getId() == R.id.sign_out_button) {
        if (mPlusClient.isConnected()) {
            mPlusClient.clearDefaultAccount();
            mPlusClient.disconnect();
            mPlusClient.connect();
        }
    }
}

这篇关于如何从Google+的帐户注销?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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