0 votes
in Android by
What is the use of Bundle in Android?

2 Answers

0 votes
by
Bundles are used to pass the required data between various Android activities. These are like HashMap that can take trivial data types. Below code shows how to transfer a piece of data by using bundle:

Bundle b=new Bundle();

b.putString("Email","[email protected]");

i.putExtras(b); // where i is intent
0 votes
by

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

Related questions

0 votes
0 votes
asked Jan 1 in Android by DavidAnderson
0 votes
asked Jan 1 in Android by DavidAnderson
...