title: Passing multiple variables on a button click
body: <p>Can anyone help me to understand why the following code fails to pass multiple values of information from one activity to another. Everything seems to be fine until it hits the second activity and then the second element to pass (messageTwo) isn't recognised.</p>
  
  <pre><code>public class ChooseYourRestaurant extends AppCompatActivity {
  
  public static final String EXTRA_MESSAGE = "com.example.macuser.biteresourcebuild.";
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_choose_your_restaurant);
  
      Intent intent = getIntent();
      String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
      TextView textView = findViewById(R.id.setCalories);
      textView.setText(message);
  
  }
  
  /**
   * Called when send button clicked
   */
  public void sendMessage(View view) {
      Intent intent = new Intent(this, MenuSelector.class);
  
      TextView editText = findViewById(R.id.autoCompleteTextView);
      String message = editText.getText().toString();
      intent.putExtra(EXTRA_MESSAGE, message);
  
      TextView textView1 = findViewById(R.id.calorieTarget);
      String messageTwo = textView1.getText().toString();
      intent.putExtra(EXTRA_MESSAGE, messageTwo);
  
      startActivity(intent);
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And then I pass to another activity</p>
  
  <pre><code>public class MenuSelector extends AppCompatActivity {
  public static final String EXTRA_MESSAGE = "com.example.macuser.biteresourcebuild.";
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_menu_selector);
  
      Intent intent = getIntent();
      String message = intent.getStringExtra(ChooseYourRestaurant.EXTRA_MESSAGE);
  
      TextView textView = findViewById(R.id.restaurantName);
      textView.setText(message);
  
      TextView textView1 = findViewById(R.id.calorieTarget);
      textView.setText(messageTwo);
  
   }
  }
  </code></pre>
  
  <p>And the thing breaks. And for the life of me I can't see why. Ive only been coding for a little while so forgive me if it's something really basic.</p>