How do you pass data to other activities?

How do you pass data to other activities?
Answer
2.
Pass Data Between Activities Use Intent Object.
  1. Create an instance of android. …
  2. Invoke the above intent object’s putExtra(String key, Object data) method to store the data that will pass to Target Activity in it. …
  3. Invoke Source Activity object’s startActivity(intent) method to pass the intent object to the android os.
 

Tìm kiếm

Back
Top