I’m new at Android development, and I would like to know something.
I know that, if I want to go to another activity I have to do :
Intent intent = new Intent(getApplicationContext(), AnotherActivity.class);
startActivity(intent);
But if my AnotherActivity contains for example a String or any variable, that I want to set before reaching it, how to do ? I would like to do something like :
AnotherActivity activity = new AnotherActivity();
activity.setValue("myValue");
// call the activity ?
Thanks for your help.
Then in
AnotherActivity: