My question is simple: if an intent object exists, I want to merely use that and add putExtra() and then startActivity to go back. However, I have no idea how to do this. Any help is appreciated.
Intent intent;
if(getIntent() != null) {
intent = getIntent();
//reroute to BarActivity class
} else {//this part is fine
intent = new Intent(FooActivity.this, BarActivity.class);
}
intent.putExtra("cardHP", "100");
startActivity(intent);
If we use the startActivityForResult method, and detect the returned result on the onActivityResult method, then this works.