From Activity A I open Activity B with
Intent intent = new Intent(this, className.class);
startActivity(intent );
Then I have to close Activity B and pass a variable value to Activity A.
Should I use another intent to call Activity A and pass the variable value with
intent.putExtra(EXTRA_MESSAGE, "message"); ?
Or should I close Activity B with finish(); and pass the variable value in other way?
Thank you
use startActivityForResult to start Activity B from Activity A and in Activity B use
setResultmethod to send data back to Activity A . for getting data in Activity A you will need to overrideonActivityResult