Example usage for android.accounts AccountManager KEY_ACCOUNT_AUTHENTICATOR_RESPONSE

List of usage examples for android.accounts AccountManager KEY_ACCOUNT_AUTHENTICATOR_RESPONSE

Introduction

In this page you can find the example usage for android.accounts AccountManager KEY_ACCOUNT_AUTHENTICATOR_RESPONSE.

Prototype

String KEY_ACCOUNT_AUTHENTICATOR_RESPONSE

To view the source code for android.accounts AccountManager KEY_ACCOUNT_AUTHENTICATOR_RESPONSE.

Click Source Link

Usage

From source file:com.github.baoti.git.accounts.AccountAuthenticatorActivity.java

public static Intent buildIntent(Context context, AccountAuthenticatorResponse response, String accountType,
        String authTokenType) {//from  w w w.j a  v  a2  s .co m
    return new Intent(context, AccountAuthenticatorActivity.class)
            .putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response)
            .putExtra(EXTRA_ACCOUNT_TYPE, accountType).putExtra(EXTRA_AUTH_TOKEN_TYPE, authTokenType);
}

From source file:drupalfit.sample.ToolBarActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mAccountAuthenticatorResponse = getIntent()
            .getParcelableExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE);

    if (mAccountAuthenticatorResponse != null) {
        mAccountAuthenticatorResponse.onRequestContinued();
    }// ww  w.  j  a v a  2 s.  c  om

    setContentView(getContentView());
    ButterKnife.inject(this);
    if (toolbar != null) {
        setSupportActionBar(toolbar);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        toggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar, R.string.open, R.string.close);
        toggle.setDrawerIndicatorEnabled(true);
        drawerLayout.setDrawerListener(toggle);
    }
}

From source file:com.rukman.emde.smsgroups.authenticator.GMSAuthenticator.java

@Override
public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType,
        String[] requiredFeatures, Bundle options) throws NetworkErrorException {

    Log.d(TAG, "Add Account");
    final Intent intent = new Intent(mContext, GMSAuthenticatorActivity.class);
    intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
    final Bundle bundle = new Bundle();
    bundle.putParcelable(AccountManager.KEY_INTENT, intent);
    return bundle;
}

From source file:org.klnusbaum.udj.auth.Authenticator.java

@Override
public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType,
        String[] requiredFeatures, Bundle options) {
    final Intent addIntent = new Intent(context, AuthActivity.class);
    addIntent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
    final Bundle addBundle = new Bundle();
    addBundle.putParcelable(AccountManager.KEY_INTENT, addIntent);
    return addBundle;
}

From source file:com.clearcenter.mobile_demo.mdAuthenticator.java

public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType,
        String[] requiredFeatures, Bundle options) {
    Log.v(TAG, "addAccount()");
    final Intent intent = new Intent(ctx, mdAuthenticatorActivity.class);
    intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
    final Bundle bundle = new Bundle();
    bundle.putParcelable(AccountManager.KEY_INTENT, intent);
    return bundle;
}

From source file:edu.mit.mobile.android.locast.accounts.AbsLocastAuthenticator.java

/**
 * {@inheritDoc}/* w  ww .  j  ava  2  s  .c  o  m*/
 */
@Override
public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType,
        String[] requiredFeatures, Bundle options) {
    final Intent intent = getAuthenticator(mContext);
    intent.putExtra(AbsLocastAuthenticatorActivity.EXTRA_AUTHTOKEN_TYPE, authTokenType);
    intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
    final Bundle bundle = new Bundle();
    bundle.putParcelable(AccountManager.KEY_INTENT, intent);
    return bundle;
}

From source file:edu.mit.mobile.android.locast.accounts.Authenticator.java

/**
 * {@inheritDoc}//from  w w  w  .j a va  2 s  .  c  om
 */
@Override
public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType,
        String[] requiredFeatures, Bundle options) {
    final Intent intent = new Intent(mContext, AuthenticatorActivity.class);
    intent.putExtra(AuthenticatorActivity.EXTRA_AUTHTOKEN_TYPE, authTokenType);
    intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
    final Bundle bundle = new Bundle();
    bundle.putParcelable(AccountManager.KEY_INTENT, intent);
    return bundle;
}

From source file:com.clearcenter.mobile_demo.mdAuthenticator.java

public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account, Bundle options) {
    Log.v(TAG, "confirmCredentials()");
    //return null;
    final Intent intent = new Intent(ctx, mdAuthenticatorActivity.class);
    intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
    final Bundle bundle = new Bundle();
    bundle.putParcelable(AccountManager.KEY_INTENT, intent);
    return bundle;
}

From source file:authenticatorStuff.AccountAuthenticatorActivity.java

/**
 * Retreives the AccountAuthenticatorResponse from either the intent of the icicle, if the
 * icicle is non-zero.//ww w. j a v  a  2  s.c  o m
 * @param icicle the save instance data of this Activity, may be null
 */
protected void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    mAccountAuthenticatorResponse = getIntent()
            .getParcelableExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE);
    if (mAccountAuthenticatorResponse != null) {
        mAccountAuthenticatorResponse.onRequestContinued();
    }
}

From source file:com.btmura.android.reddit.accounts.SupportAccountAuthenticatorActivity.java

/**
 * Retreives the AccountAuthenticatorResponse from either the intent of the icicle, if the
 * icicle is non-zero.//from ww w  .  j a  va  2  s .  c o m
 * 
 * @param icicle the save instance data of this Activity, may be null
 */
protected void onCreate(Bundle icicle) {
    super.onCreate(icicle);

    mAccountAuthenticatorResponse = getIntent()
            .getParcelableExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE);

    if (mAccountAuthenticatorResponse != null) {
        mAccountAuthenticatorResponse.onRequestContinued();
    }
}