Intent myIntent = new Intent(CurrentActivity.this, NextActivity.class);
myIntent.putExtra("key", value); //Optional parameters
CurrentActivity.this.startActivity(myIntent);
public void sendMessage(View view) {
Intent intent = new Intent(this, DisplayMessageActivity.class);
startActivity(intent);
}
/*DisplayMessageActivity is the name of the other activity*/
Intent myIntent = new Intent(CurrentActivity.this, NextActivity.class);
myIntent.putExtra("key", value); //Optional parameters
CurrentActivity.this.startActivity(myIntent);