title: adding: action android:name="android.intent.action.SEND" to android manifest crashes the App
body: <p>I am trying to create an app that will be the default SMS app
  I have followed several guids telling to add this block to the main activity:</p>
  
  <blockquote>
    <p></p>
  </blockquote>
  
  <pre><code>&lt;intent-filter&gt;             
   &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
                   &lt;category android:name="android.intent.category.DEFAULT"/&gt; 
                   &lt;action android:name="android.intent.action.MAIN" /&gt;
                   &lt;action android:name="android.intent.action.VIEW" /&gt;
                   &lt;action android:name="android.intent.action.SEND" /&gt;
                   &lt;action android:name="android.intent.action.SENDTO" /&gt;
                   &lt;data android:scheme="sms" /&gt;
                   &lt;data android:scheme="smsto" /&gt;
                   &lt;data android:scheme="mms" /&gt;
                   &lt;data android:scheme="mmsto" /&gt;
               &lt;/intent-filter&gt;
  </code></pre>
  
  <p>This worked great (was just part of the change) and when i debug the App from android studio, all goes well (meaning running the code on my phone but using Android studio)</p>
  
  <p>But, after generating a release App (apk) and installing it on a device i get this error upon opening of the App</p>
  
  <pre><code>2019-04-04 00:36:35.708 8404-8404/? E/GlobalPackageInstaller: launchApp error:
      java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.toString()' on a null object reference
          at android.app.Instrumentation.execStartActivity(Instrumentation.java:1581)
          at android.app.Activity.startActivityForResult(Activity.java:4526)
          at android.app.Activity.startActivityForResult(Activity.java:4484)
          at android.app.Activity.startActivity(Activity.java:4845)
          at android.app.Activity.startActivity(Activity.java:4813)
          at com.miui.global.packageinstaller.GlobalPackageInstallerActivity.launchApp(GlobalPackageInstallerActivity.java:306)
          at com.miui.global.packageinstaller.GlobalPackageInstallerActivity.onClick(GlobalPackageInstallerActivity.java:280)
          at android.view.View.performClick(View.java:6266)
          at android.view.View$PerformClick.run(View.java:24730)
          at android.os.Handler.handleCallback(Handler.java:793)
          at android.os.Handler.dispatchMessage(Handler.java:98)
          at android.os.Looper.loop(Looper.java:173)
          at android.app.ActivityThread.main(ActivityThread.java:6698)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782)
  </code></pre>
  
  <p>if i remove these 4 lines:</p>
  
  <pre><code>&lt;data android:scheme="sms" /&gt;
  &lt;data android:scheme="smsto" /&gt;
  &lt;data android:scheme="mms" /&gt;
  &lt;data android:scheme="mmsto" /&gt;
  </code></pre>
  
  <p>The App does not crash (but does not appear in the list of possible SMS default apps)</p>