How Do I Get Bundle Data on Android?
Contents

How do I get bundles on Android?

Bundle bundle = getIntent(). getExtras(); String title = bundle. getString(“key_1”, “Default”); boolean b = bundle. getBoolean(“key_2”, false);

What is bundle Android example?

Bundle is used to pass data between Activities. You can create a bundle, pass it to Intent that starts the activity which then can be used from the destination activity. Bundle:- A mapping from String values to various Parcelable types. Bundle is generally used for passing data between various activities of android.

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest