iam trying to switch from say activity 1 to activity 2 when a button is clicked. and ive got how to do that. what i cant figure out is how to get it so 50% of the time it goes to activity 2 and the other 50% to activity 3. iam sorry i know its a very obvious question. iam new to this so could you please explain a little and also similar effects like switching to completely randomn out of say 5 different specified activites. thanks in advance ... intent code below. please explain using my code if possible.
yes.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent yes1=new Intent(MainActivity.this,Question2.class);
startActivity(yes1);