title: intent.getAction() and intent.getType() returns null
body: <p>I am trying to receive data from other apps when share button is pressed. App is shown in the chooser and when I press the app, it  opens but I can't get text!!</p>
  
  <p>Here's my splash screen if it makes any sense. </p>
  
  <p><strong>Cover.java</strong></p>
  
  <pre><code>public class Cover extends AppCompatActivity {
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      startActivity(new Intent(Cover.this,MainActivity.class));
      this.finish();
  }
  }
  </code></pre>
  
  <p><strong>MainActivity.java</strong></p>
  
  <pre><code>onCreate(...)
  setContentView(....)
   Intent intent = getIntent();
      String action = intent.getAction();
      String type = intent.getType();
      Log.d("nikesh"," "+action); //this  prints null
      Log.d("nikesh"," "+type); //this prints null
      if (Intent.ACTION_SEND.equals(action) &amp;&amp; type != null) {
          if ("text/plain".equals(type)) {
              handleSendText(intent);
          }
      }
  
  
     private void handleSendText(Intent intent) {
      String sharedText = intent.getStringExtra(Intent.EXTRA_TEXT);
      Log.d("khee",sharedText);      //these are 
      if (sharedText != null) {      //not printed
          Log.d("khee",sharedText);
  textView.setText(sharedText);
          // Update UI to reflect text being shared
      }
  }
  </code></pre>
  
  <p>manifest.xml</p>
  
  <pre><code> &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;action android:name="android.intent.action.SEND" /&gt;
              &lt;category android:name="android.intent.category.DEFAULT" /&gt;
              &lt;data android:mimeType="text/plain" /&gt;
   &lt;/intent-filter&gt;
  </code></pre>