53.6 Creating the Intent
The objective for MainActivity is to create and start an intent when the user touches the “Send Text” button. As part of the intent creation process, the question string entered by the user into the EditText view will be added to the intent object as a key-value pair. When the user interface layout was created for MainActivity, the button object was configured to call a method named sendText() when “clicked” by the user. This method now needs to be added to the MainActivity class MainActivity.java source file as follows:
package com.ebookfrenzy.explicitintent;
.
.
import android.content.Intent;
.
.
public class MainActivity extends AppCompatActivity {
.
.
public void sendText(View view) {
Intent i = new Intent(this, SecondActivity.class);
String myString...