Example usage for android.os Bundle Bundle

List of usage examples for android.os Bundle Bundle

Introduction

In this page you can find the example usage for android.os Bundle Bundle.

Prototype

public Bundle() 

Source Link

Document

Constructs a new, empty Bundle.

Usage

From source file:com.browsertophone.ShareLink.java

private void sendToast(String toastMessage) {
    Message msg = new Message();
    Bundle data = new Bundle();
    data.putString(TOAST, toastMessage);
    msg.setData(data);//from   w  ww.j a v  a 2s  .c  o m
    mHandler.sendMessage(msg);
}

From source file:com.normalexception.app.rx8club.task.DeletePmTask.java

@Override
protected void onPostExecute(Void result) {
    try {//from  w ww.  j  av  a 2  s.  c  om
        mProgressDialog.dismiss();
        mProgressDialog = null;
    } catch (Exception e) {
        Log.w(TAG, e.getMessage());
    }

    Bundle args = new Bundle();
    args.putString("link", HtmlFormUtils.getResponseUrl());
    args.putBoolean(PrivateMessageInboxFragment.showOutboundExtra, outbound);
    FragmentUtils.fragmentTransaction(sourceFragment.getActivity(), new PrivateMessageInboxFragment(), false,
            false, args);
}

From source file:com.cttapp.bby.mytlc.layer8apps.CalendarHandler.java

/************
 *  PURPOSE: Used to send our updates back to the main thread
 *  ARGUMENTS: String status//from   w ww .  j a va2 s. c om
 *  RETURNS: VOID
 *  AUTHOR: Devin Collins <agent14709@gmail.com>
 *************/
private void updateStatus(String status) {
    Message msg = Message.obtain();
    Bundle data = new Bundle();
    data.putString("status", status);
    msg.setData(data);
    try {
        messenger.send(msg);
    } catch (Exception e) {
        // TODO: Error reporting?
    }
}

From source file:com.nadmm.airports.aeronav.AeroNavService.java

protected void sendResult(String action, String cycle, File pdfFile) {
    Bundle extras = new Bundle();
    extras.putString(CYCLE_NAME, cycle);
    extras.putString(PDF_NAME, pdfFile.getName());
    if (pdfFile.exists()) {
        extras.putString(PDF_PATH, pdfFile.getAbsolutePath());
    }/*from   w w w.  ja v a 2 s. c  o m*/
    sendResult(action, extras);
}

From source file:com.group7.dragonwars.MapSelectActivity.java

@Override
public final void onItemClick(final AdapterView<?> parent, final View v, final int position, final long id) {
    if (position < mapInfo.size()) {
        Intent intent = new Intent(this, PlayerSelectActivity.class);
        Bundle b = new Bundle();
        b.putString("mapFileName", mapInfo.get(position).getPath());
        b.putString("mapName", mapInfo.get(position).getName());

        int numPlayers = mapInfo.get(position).getPlayers();
        b.putBooleanArray("isAi", new boolean[numPlayers]);
        // boolean defaults to false, what could possibly go wrong?
        b.putInt("numPlayers", numPlayers);

        /* Make a fake player list for now, again */
        String[] playerNames = new String[numPlayers];

        for (Integer i = 0; i < numPlayers; ++i) {
            playerNames[i] = ("Player " + (i + 1));
        }/*from w w  w.  j  a v a 2s  . c om*/

        b.putStringArray("playerNames", playerNames);

        intent.putExtras(b);
        startActivity(intent);
    }
}

From source file:com.ichi2.anki.dialogs.CustomStudyDialog.java

public static CustomStudyDialog newInstance(int id, long did, boolean jumpToReviewer) {
    CustomStudyDialog f = new CustomStudyDialog();
    Bundle args = new Bundle();
    args.putInt("id", id);
    args.putLong("did", did);
    args.putBoolean("jumpToReviewer", jumpToReviewer);
    f.setArguments(args);//from   w  w  w.  j a v  a  2s . com
    return f;
}

From source file:com.normalexception.app.rx8club.task.PmTask.java

@Override
protected void onPostExecute(Void result) {
    try {/*from   w  w  w.j a v  a  2s. c o m*/
        mProgressDialog.dismiss();
        mProgressDialog = null;
    } catch (Exception e) {
        Log.w(TAG, e.getMessage());
    }

    Bundle args = new Bundle();
    args.putString("link", HtmlFormUtils.getResponseUrl());
    FragmentUtils.fragmentTransaction(sourceFragment.getActivity(), new PrivateMessageInboxFragment(), false,
            false, args);
}

From source file:pt.up.mobile.authenticator.Authenticator.java

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