Android Open Activity from FirstActivity
Intent intent = new Intent(this, SecondActivity.class); intent.putExtra(EXTRA_MESSAGE, someMessage); startActivity(intent);
If you are trying inside onclick listener better to use Activity_Name.this insted of this
Intent intent = new Intent(FirstActivity.this, SecondActivity.class);
No data to send
startActivity(new Intent(FirstActivity.this, SecondActivity.class));
Receiving the Intent from Second Activity
Intent intent = getIntent(); String message = intent.getStringExtra(FirstActivity.EXTRA_MESSAGE);