Take a look at some examples of examples (from common tasks and how to make them in Android):
basically, you use myIntent.putExtra (...) to send data (maybe String, Int, Boolean, etc.) to the other side (another action) ...
then the result will be passed back to the calling ActivityActivityResult () method:
protected void onActivityResult(int requestCode, int resultCode, Intent data){ // See which child activity is calling us back. switch (resultCode) { case CHOOSE_FIGHTER: // This is the standard resultCode that is sent back if the // activity crashed or didn't doesn't supply an explicit result. if (resultCode == RESULT_CANCELED){ myMessageboxFunction("Fight cancelled"); } else { myFightFunction(data); } default: break; }
N.
source share