Example usage for android.accounts AccountManager KEY_INTENT

List of usage examples for android.accounts AccountManager KEY_INTENT

Introduction

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

Prototype

String KEY_INTENT

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

Click Source Link

Document

Bundle key used for an Intent in results from methods that may require the caller to interact with the user.

Usage

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:com.android.volley.toolbox.AndroidAuthenticatorTest.java

@Test(expected = AuthFailureError.class)
public void resultContainsIntent() throws Exception {
    Intent intent = new Intent();
    Bundle bundle = new Bundle();
    bundle.putParcelable(AccountManager.KEY_INTENT, intent);
    when(mAccountManager.getAuthToken(mAccount, "cooltype", false, null, null)).thenReturn(mFuture);
    when(mFuture.getResult()).thenReturn(bundle);
    when(mFuture.isDone()).thenReturn(true);
    when(mFuture.isCancelled()).thenReturn(false);
    mAuthenticator.getAuthToken();/*from ww w  . j  a  v a  2  s .c o m*/
}

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

/**
 * {@inheritDoc}//  w ww  .  j a  va  2s .co 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:fr.unix_experience.owncloud_sms.authenticators.OwnCloudAuthenticator.java

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

    intent = new Intent(_context, LoginActivity.class);

    result = new Bundle();
    result.putParcelable(AccountManager.KEY_INTENT, intent);
    return result;
}

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

/**
 * {@inheritDoc}// w  w  w .j a v a  2 s  . co m
 */
@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:com.manning.androidhacks.hack023.authenticator.Authenticator.java

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

    final Intent intent = new Intent(mContext, AuthenticatorActivity.class);
    intent.putExtra(AuthenticatorActivity.PARAM_AUTHTOKEN_TYPE, authTokenType);
    intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
    final Bundle bundle = new Bundle();
    bundle.putParcelable(AccountManager.KEY_INTENT, intent);

    return bundle;

}