如何在Gmail API中强制删除Google默认选择的帐户? [英] How to forcefully remove Google default selected Account in Gmail API?
本文介绍了如何在Gmail API中强制删除Google默认选择的帐户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我从android中的应用注销时,我正在尝试从gmail api中删除默认选择的帐户.
I am trying to remove default selected account from gmail api when logout from app in android.
这是GoogleAccountCredential函数,用于建立gmail帐户的连接.
this is GoogleAccountCredential function to establish connection of gmail account.
GoogleAccountCredential mCredential = GoogleAccountCredential.usingOAuth2(
getApplicationContext(), Arrays.asList(AppController.SCOPES))
.setBackOff(new ExponentialBackOff());
推荐答案
Gmail API不提供.默认帐户选择方法,您可以在需要时调用此方法来选择帐户
Gmail API doesn't Provide And default account select method you can just call this method to select account when required
startActivityForResult(
mCredential.newChooseAccountIntent(),
REQUEST_ACCOUNT_PICKER);
只记得注销时将null传递给mCredential
just remember to pass null to mCredential
when logout
这篇关于如何在Gmail API中强制删除Google默认选择的帐户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文