Difference between Bundle and putExtra of Intent

Using bundle will create negligible difference in your application. Using a bundle is slightly more manageable and clear. When you are using a putExtra, you are using a bundle anyway, you can see here that Intent store data passed through putExtra internally as Bundle-
public Intent putExtra(String name, String value) {
    if (mExtras == null) {
        mExtras = new Bundle();
    }
    mExtras.putString(name, value);
    return this;
}
You are using bundle anyway, there is no alternative.
Well there's a very stupid alternative of using shared preferences.
The only time i have found Bundles more useful is when i have a bunch of variables that i need to pass between multiple activities. I can easily pass around the same bundle every time instead of passing around single values.

Comments

  1. Thank you cooperative!
    Definitely one favorite post.
    Soon you can quickly download all the crack software
    Please visit!
    I think you will see this software. Visit our website: -
    ===============================================
    Softcracks.Info
    =================================================
    Hotspot Shield Elite Vpn
    Download Vidmate
    Golden Software Voxler
    Password Recovery Bundle
    IVT BlueSoleil
    Cash Register Pro

    ReplyDelete
  2. This site have particular software articles which emits an impression of being a significant and significant for you individual, able software installation.This is the spot you can get helps for any software installation, usage and cracked.
    ismailpc
    ivt-bluesoleil-crack
    auslogics-registry-cleaner-pro-crack
    loaris-trojan-remover-crack
    easeus-video-editor-crack
    gallery-vault

    ReplyDelete
  3. This site have particular software articles which emits an impression of being a significant and significant for you individual, able software installation.This is the spot you can get helps for any software installation, usage and cracked.
    ismailpc
    password-recovery-bundle-crack
    ivt-bluesoleil-crack
    auslogics-registry-cleaner-pro-crack
    loaris-trojan-remover-crack
    easeus-video-editor-crack

    ReplyDelete

Post a Comment