title: Android Studio: Bundle not working
body: <p>In one of my activities I have a button, when pressed it stores a string value inside a bundle that I want to send to another activity and display in a TextView.</p>
  
  <p>Code for when the bundle is created:</p>
  
  <pre><code>public void enemy_seen(View view){
  
      Intent send_enemy = new Intent(rear_gunner.this, pilot.class);
      String sight = "ENEMY SPOTTED";
  
      Bundle spotted = new Bundle();
      spotted.putString("TAG",sight);
      send_enemy.putExtras(spotted);
  
  
  
  }
  </code></pre>
  
  <p>This code hapens on the button clicked and so far, from what I can tell this works....I believe.</p>
  
  <p>When the bundle is called in second activity:</p>
  
  <pre><code>public class pilot extends AppCompatActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_pilot);
      //sets screen orientation on created
      this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
      Bundle bundle = getIntent().getExtras();
      String something = bundle.getString("TAG");
      TextView enemy = (TextView) findViewById(R.id.enemy_spotted);
      enemy.setText(something);
  
  }
  }
  </code></pre>
  
  <p>The activity loads and crashes. So it must be something to do with when using the bundle I believe?</p>
  
  <p><a href="https://i.stack.imgur.com/48HWS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/48HWS.png" alt="enter image description here"></a></p>