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:org.ale.scanner.zotero.web.googlebooks.GoogleBooksAPIClient.java

public void isbnLookup(String isbn) {
    APIRequest r = newRequest();//w w w  . j  a  va 2s.  co m
    r.setHttpMethod(APIRequest.GET);
    r.setURI(URI.create(BOOK_SEARCH_ISBN + isbn));
    Bundle extra = new Bundle();
    extra.putString(GoogleBooksAPIClient.EXTRA_ISBN, isbn);
    r.setExtra(extra);

    mRequestQueue.enqueue(r);
}

From source file:br.liveo.ndrawer.ui.fragment.MainFragment22.java

public static MainFragment22 newInstance(String text) {
    MainFragment22 mFragment = new MainFragment22();
    Bundle mBundle = new Bundle();
    mBundle.putString(TEXT_FRAGMENT, text);
    mFragment.setArguments(mBundle);/*  w  w  w . ja  v  a  2 s .  c  om*/
    return mFragment;
}

From source file:com.microsoft.onedrive.apiexplorer.DeltaFragment.java

/**
 * Create a new instance of ItemFragment
 * @param item the item//from  w  w w.ja v a  2  s  .c  o  m
 * @return The fragment
 */
static DeltaFragment newInstance(final Item item) {
    final DeltaFragment fragment = new DeltaFragment();
    final Bundle args = new Bundle();
    args.putString(ARG_ITEM_ID, item.id);
    args.putString(ARG_ITEM_NAME_ID, item.name);
    fragment.setArguments(args);
    return fragment;
}

From source file:com.miz.mizuu.fragments.MovieDiscoveryFragment.java

public static MovieDiscoveryFragment newInstance(String type, String json, String baseUrl) {
    MovieDiscoveryFragment pageFragment = new MovieDiscoveryFragment();
    Bundle bundle = new Bundle();
    bundle.putString("type", type);
    bundle.putString("json", json);
    bundle.putString("baseUrl", baseUrl);
    pageFragment.setArguments(bundle);//from   w  w w. jav a2  s  . c o m
    return pageFragment;
}

From source file:com.partypoker.poker.engagement.reach.EngagementPoll.java

/**
 * Parse a poll.//from   ww  w  . j  a  v  a  2s.  c  o m
 * @param campaignId already parsed campaign id.
 * @param values campaign data.
 * @throws JSONException if a parsing error occurs.
 */
EngagementPoll(com.microsoft.azure.engagement.reach.CampaignId campaignId, ContentValues values)
        throws JSONException {
    super(campaignId, values);
    mAnswers = new Bundle();
}

From source file:com.github.rutvijkumar.twittfuse.fragments.DirectMessagesFragments.java

public static DirectMessagesFragments newInstance(int page, String title) {
    DirectMessagesFragments fragment = new DirectMessagesFragments();
    Bundle args = new Bundle();
    args.putInt("page", page);
    args.putString("title", title);
    fragment.setArguments(args);//from ww w  .java 2  s .co  m
    return fragment;
}

From source file:com.ymt.demo1.plates.knowledge.KnowledgeItemListViewFragment.java

public static KnowledgeItemListViewFragment getNewInstance(int knowledgeType) {
    KnowledgeItemListViewFragment fragment = new KnowledgeItemListViewFragment();
    Bundle bundle = new Bundle();
    bundle.putInt("knowledge_type", knowledgeType);
    fragment.setArguments(bundle);/*www.j  a  v  a 2  s.  c  om*/
    return fragment;
}

From source file:com.easy.facebook.android.apicall.RestApi.java

private String postToFriendCall(String message, String friendID, String urlPicture) throws EasyFacebookError {

    Bundle params = new Bundle();
    params.putString("format", "json");
    params.putString("method", "stream.publish");
    params.putString("access_token", facebook.getAccessToken());
    params.putString("message", message);
    params.putString("target_id", friendID);

    if (urlPicture != null) {
        String pictureName = urlPicture.substring(urlPicture.lastIndexOf('/'), urlPicture.length());
        params.putString("attachment", "{\"media\": [{\"type\": \"image\",\"src\": \"" + pictureName
                + "\", \"href\": \"" + urlPicture + "\"}]}");
    }// w w w  .  jav a2  s .c o  m

    String jsonResponse = "";
    try {

        jsonResponse = Util.openUrl("https://api.facebook.com/restserver.php", "POST", params);

    } catch (MalformedURLException e) {

        throw new EasyFacebookError(e.toString(), "MalformedURLException");
    } catch (IOException e) {

        throw new EasyFacebookError(e.toString(), "IOException");
    }

    return jsonResponse.replace("\"", "");

}

From source file:com.marpies.ane.facebook.accountkit.utils.FREObjectUtils.java

public static Bundle getBundle(FREArray array) {
    Bundle result = null;//  ww w. j a v a  2  s  . com

    try {
        long length = array.getLength();
        if (length > 0) {
            result = new Bundle();
            for (long i = 0; i < length;) {
                String key = getString(array.getObjectAt(i++));
                String value = getString(array.getObjectAt(i++));
                result.putString(key, value);
            }
        }
    } catch (FREInvalidObjectException e) {
        e.printStackTrace();
    } catch (FREWrongThreadException e) {
        e.printStackTrace();
    }

    return result;
}

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  w  ww. ja v a 2s .  c o  m*/
}