The intent can optionally have a String key/String message pair. The key value should be unique so it won't collide with a public constant in another activity or app.
Activity #1
public final static String EXTRA_MESSAGE = "com.example.app.message";
Button button = (Button) findViewById(R.id.button);
button.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// Create a new intent.
Intent myIntent = new Intent(getApplicationContext(), ActivityTwo.class);
// Optionally add a key/value pair if you want to transfer data to another activity.
myIntent.putExtra(EXTRA_MESSAGE, editText1.getText().toString());
// Pass the intent to the startActivity method.
startActivity(myIntent);
}
Activity #2
In the onCreate method of ActivityTwo, get the intent that started that activity then use the key EXTRA_MESSAGE to retrieve the string message.
Intent myIntent = getIntent();
textView1.setText(myIntent.getStringExtra(EXTRA_MESSAGE));