How Pass Data from One Activity to Another Activity in Android Using Bundle?
Contents How Do I Transfer a Bundle from One Activity to Another? //Create the Bundle Bundle Bundle = New Bundle(); //Add Your Data from getFactualResults...
Contents
How do I transfer a bundle from one activity to another?
//Create the bundle Bundle bundle = new Bundle(); //Add your data from getFactualResults method to bundle bundle. putString(“VENUE_NAME”, venueName); //Add the bundle to the intent i. putExtras(bundle); startActivity(i); In you code (second Activity) however, you are referring to the key in the Bundle as MainActivity.
Must Read
How pass data from one activity to another activity in Android?
These operations are as follows:
- first Add the listener on send button and this button will send the data. …
- Now create the String type variable for store the value of EditText which is input by user. …
- Now create the Intent object First_activity. …
- Put the value in putExtra method in key value pair then start the activity.
12 дек. 2019 г.