我的应用程序与使用 OAuth 授权的服务器连接。我应该如何在账户管理器中存储这些账户?如果我有登录并通过,它可能如下所示:
Account account = new Account("user1", context.getString(R.string.ACCOUNT_TYPE));
AccountManager am = AccountManager.get(context);
if (am.addAccountExplicitly(account, "pass1", null)) {
result = new Bundle();
Log.i(TAG, "account: "+account.name+", "+account.type);
result.putString(AccountManager.KEY_ACCOUNT_NAME, account.name);
result.putString(AccountManager.KEY_ACCOUNT_TYPE, account.type);
activity.setAccountAuthenticatorResult(result);
但是在 OAuth 帐户的情况下应该传递什么而不是用户名并传递?我应该在哪里存储 OAuth-secret?OAuth 令牌应该存储在 KEY_AUTHTOKEN 中吗?