How to take a random generated integer and pass it to another Activity?
I have worked with Intents before, however since I never see the value of the integer, I cannot specify.
int w = numGen.nextInt(7);
Intent intent = new Intent(this, AnotherActivity.class); intent.putExtra("myrandom", yourRandomVal); startActivity(this, intent);
In your other activity's
int passedRandom = getIntent().getIntExtra("myrandom");
The thing is you can add extras to an intent by using various
putExtra() and then get it using