Atkinson_88
Newbie
Hello,
The below passes in an extra message to a class called DisplayMessageActivity
[HIGH]
/** Called when the user clicks the Send button */
public void sendmessage(View view) {
Intent intent = new Intent(this, DisplayMessageActivity.class);
EditText editText = (EditText) findViewById(R.id.edit_message);
String message = editText.getText().toString();
intent.putExtra(EXTRA_MESSAGE, message); // here extra value
startActivity(intent);
}
[/HIGH]
How can i pass in another value because at the other end i can only get Extra_message which can only be used once....
this is inside the DisplayMessageActivity
[HIGH]
Intent intent = getIntent();
String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
[/HIGH]
even if someone can show me how to pass two values i would highly appreciate it.
The below passes in an extra message to a class called DisplayMessageActivity
[HIGH]
/** Called when the user clicks the Send button */
public void sendmessage(View view) {
Intent intent = new Intent(this, DisplayMessageActivity.class);
EditText editText = (EditText) findViewById(R.id.edit_message);
String message = editText.getText().toString();
intent.putExtra(EXTRA_MESSAGE, message); // here extra value
startActivity(intent);
}
[/HIGH]
How can i pass in another value because at the other end i can only get Extra_message which can only be used once....
this is inside the DisplayMessageActivity
[HIGH]
Intent intent = getIntent();
String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
[/HIGH]
even if someone can show me how to pass two values i would highly appreciate it.