title: android - getIntent().getStringExtra() returns null
body: <p>I have implemented <code>onPause()</code> and <code>onResume()</code> method in my application as below:</p>
  
  <pre><code>protected void onPause() {
          super.onPause();
  
          String receiver = phoneNoField.getText().toString();
          String message = messageBody.getText().toString();
          getIntent().putExtra(MESSAGE_RECEIVER, receiver);
          getIntent().putExtra(MESSAGE_BODY, message);
  
          Log.d(TAG, receiver + " " + message);       
      }
  
  
  protected void onResume() {
          super.onResume();
  
          String receiver = getIntent().getStringExtra(MESSAGE_RECEIVER);
          String message = getIntent().getStringExtra(MESSAGE_BODY);
          if(receiver != null)
              phoneNoField.setText(receiver);
          if(message != null)
              messageBody.setText(message);
  
          Log.d(TAG, receiver + " " + message);       
      }
  </code></pre>
  
  <p>When <code>onPause()</code> method is called, i see the values have been set. But in my <code>onResume()</code> method <code>getStringExtra()</code> always returns <code>null</code>. Anything wrong with my approach?</p>