In Android we can pass data from one activity to another via Intent using startActivity(). The syntax for this is shown below :
1 2 3 |
Intent in = new Intent(MainActivity.this, SecondActivity.class); in.putExtra("message",message); startActivity(in); |
Similarly we can get data from our other activity that is opened by an activity like SecondActivity from MainActivity and we need some message from SecondActivity back again to MainActivity so for this
Read More