I created in my Android project another activity. I execute it using this code(this is written in my main activity):
activity2 = new Intent(MainActivity.this, SecondaryActivity.class);
startActivity(activity2);
The problem is that I need to pass a value to the new activity. I've done it creating a public static
value in the secondary activity. Can I do it in a different way?