use of com.newsrob.auth.IAuthenticationCallback in project newsrob by marianokamp.
the class AccountListActivity method doAuth.
protected void doAuth(final String accountName) {
final IAuthenticationCallback callback = new IAuthenticationCallback() {
@Override
public void onError(Exception e) {
AccountListActivity.this.onError(e);
}
@Override
public void onAuthTokenReceived(String googleAccount, String authToken) {
EntryManager entryManager = EntryManager.getInstance(AccountListActivity.this);
entryManager.doLogin(googleAccount, authToken);
LoginActivity.onSuccess(entryManager, googleAccount);
SDK9Helper.apply(entryManager.getSharedPreferences().edit().remove(EntryManager.SETTINGS_PASS));
AccountListActivity.this.finish();
}
};
accountManagementUtils.getAuthToken(AccountListActivity.this, handler, callback, accountName);
}
Aggregations