【发布时间】:2013-12-12 16:59:21
【问题描述】:
我正在使用AccountManager 来存储 auth_token。我正在使用以下代码来存储 auth_token。但我无法找回它。
AccountManager.get(this).addAccountExplicitly(account, "", bundle);
而且,我正在使用以下代码(使用 Volley 库)将其取回,但它会抛出 AuthFailureError。
try {
Logging.d(LOG_TAG, "AUTH TOKEN : "
+ (new AndroidAuthenticator(this, account,
CustomAuthenticator.AUTHTOKEN_TYPE).getAuthToken()));
} catch (AuthFailureError e) {
Logging.d(LOG_TAG, "AUTH FAILURE");
e.printStackTrace();
}
有什么建议吗?
【问题讨论】:
标签: android authentication accountmanager