How to pass data between activies android en
The second line of this code snippet, passes data to the new activity:
Intent intent = new Intent(getBaseContext(), newActivity.class); intent.putExtra("EXTRA_DATA", data); startActivity(intent);
and in the destination, we can access the data by this line of code:
String s = getIntent().getStringExtra("EXTRA_DATA");