
Invoke Source Activity object’s startActivity(intent) method to pass the intent object to the android os.intent.putExtra("message", "This message comes from PassingDataSourceActivity's first button") Invoke the above intent object’s putExtra(String key, Object data) method to store the data that will pass to Target Activity in it.

Intent intent = new Intent(PassingDataSourceActivity.this, PassingDataTargetActivity.class) Create an instance of class, pass the Source Activity object ( who sent the intent object ) and the Target Activity class ( who can receive the intent object ) to the Intent class constructor.Pass Data Between Activities Use Intent Object. If you click the second button in the Source Activity, it will pass data to the Target Activity also, and when you click the return button or click the android Back menu at the bottom in the Target Activity, the Source Activity can get the Target Activity returned response result data and display the result text in the Source Activity.If you click the first button in the Source Activity, it will pass data to the Target Activity, and when you click the return button in the Target Activity, the Source Activity can not get the response data from Target Activity.The Target Activity contains one button ( PASS RESULT DATA BACK TO SOURCE ACTIVITY ).The Source Activity contains two buttons ( PASS DATA TO NEXT ACTIVITY and PASS DATA TO NEXT ACTIVITY AND GET RESULT BACK ).There are two activities in this example, a Source Activity, and a Target Activity.
