title: Using email intent to send an email with large number of attachments hangs/doesn't launch intent
body: <p>I have an activity that launches the email intent, passing an array list of Uri objects, that point to local files.  This works when there are a small number of files e.g. 3, or 10.  However when i have 1000+ files (totalling a size of 14 mb), the activity hangs (which is expected, lots of i/o), however it sometimes hangs indefinitely or when it does return the intent doesn't launch.  </p>
  
  <p>Below code (called by an AsyncTask) creates the array list of Uri's and launches Email intent:</p>
  
  <pre><code>private Intent createEmailAndSend(List&lt;FilePath&gt; paths) {
      Intent emailIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);
      emailIntent.setType("message/rfc822");
      emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Email subject");
  
      ArrayList&lt;Uri&gt; fileUriList = new ArrayList&lt;&gt;();
  
      for (FilePath filePath : paths) {
          File file = new File(filePath.getPath());
          fileUriList.add(Uri.fromFile(file));
      }
  
      emailIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, fileUriList);
  
      startActivity(intent);
  }
  </code></pre>
  
  <p>Testing on: </p>
  
  <ul>
  <li>Genymotion, Android Studio 2 Beta Emulator, Nexus 7 and Nexus 6p</li>
  <li>Android: Minimum 19 (Kitkat) and target is Kitkat</li>
  </ul>
  
  <p>Does anyone know what i'm doing wrong?</p>