title: Starting an activity from BroadcastReceiver getExtras is null
body: <p>I've been toying with how to start a new intent in my main class from my BroadcastReceiver. Thankfully, after many attempts and some help from SO I successfully triggered the onNewIntent(). However, I need to pass data to the intent so I can do something with it. Below you will see the code in my BroadcastReceiver that starts the intent and the code that handles the intent from my main class. The expected result would be to print out the passed value from the BroadcastReceiver, instead, I get a null exception. I have put a breakpoint and can verify that both the intent and getIntent (which should be the original intent not the intent that was passed in from the BroadcastReceiver) have null extras. Any help would be appreicated. </p>
  
  <p><strong>BroadcastReceiver:</strong></p>
  
  <pre><code>Intent intentMain = new Intent(context.getApplicationContext(), MainActivity.class);
  intentMain.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
  intent.putExtra("com.xxx.xxx.FROM", "test");
  intent.putExtra("com.xxx.xxx.MSG", "test2");
  context.startActivity(intentMain);
  </code></pre>
  
  <p><strong>onNewIntent():</strong></p>
  
  <pre><code>@Override
      protected void onNewIntent(Intent intent) {
          Log.d("SmsReceiver", "entered onNewIntent");
          super.onNewIntent(intent);
          if (intent.getExtras() != null) {
              String from = intent.getExtras().getString("com.xxx.xxx.FROM");
              String msg = intent.getExtras().getString("com.xxx.xxx.MSG");
          }
      }
  </code></pre>