tags:

views:

26

answers:

1

Is it possible to create/push-onto-stack a new Activity of the same main Activity in an Android application with an argument passed to the Activities constructor? Specifically from a Dialog object...

+1  A: 

Just fire off a new Intent with your argument in the extra.

Intent i = new Intent(MyActivity.this, MyActivity.class);
i.putExtra("some_key", someData);
startActivity(i);

To get the Extra in OnCreate, just do

getIntent().getExtras().getLong/getInt/getString/getWhatever
QRohlf