title: Android send email with multiple attachments issues
body: <p>I was able to send email with single attachment. When I switch to send email with multiple attachment, the send mail code doesn't work. Here is my code :</p>
  
  <pre><code> private void ShareViaEmail(String csvFilePath, String ibiFilePath, String message, String mailTo) {
      try {
          //File Root= Environment.getExternalStorageDirectory();
          //String fileLocation=Root.getAbsolutePath() + folderName + "/" + fileName;
          //Intent intent = new Intent(Intent.ACTION_SENDTO);
  
          //attach multiple file
          Intent intent = new Intent(Intent.ACTION_SEND_MULTIPLE);
  
          intent.setType("text/plain");
          //String message="CSV file is " + csvFilePath + ".";
          intent.putExtra(Intent.EXTRA_SUBJECT, "Report ");
          //intent.putExtra(Intent.EXTRA_STREAM, Uri.parse( "file://"+csvFilePath));
          Log.d(LOG_TAG,"ibiFilePath : "+ibiFilePath );
          //attached multiple file
          //followed by:
          ArrayList&lt;Uri&gt; uris = new ArrayList&lt;Uri&gt;();
  
          uris.add(Uri.fromFile(new File(csvFilePath)));
          uris.add(Uri.fromFile(new File(ibiFilePath)));
  
          intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris);
  
          intent.putExtra(Intent.EXTRA_TEXT, message);
          intent.setData(Uri.parse("mailto:" + mailTo));
          intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  
          startActivity(intent);
      } catch(Exception e)  {
  
          Log.d(LOG_TAG,"exception raises during sending mail"+e );
      }
  }
  </code></pre>
  
  <p>I am getting the following errors message.
  2019-08-18 11:19:56.736 2979-2979/com.xyz.testemail W/Bundle: Key android.intent.extra.TEXT expected ArrayList but value was a java.lang.String.  The default value  was returned.
  2019-08-18 11:19:56.741 2979-2979/com.xyz.testemail W/Bundle: Attempt to cast generated internal exception:
      java.lang.ClassCastException: java.lang.String cannot be cast to java.util.ArrayList
          at android.os.BaseBundle.getCharSequenceArrayList(BaseBundle.java:1265)
          at android.os.Bundle.getCharSequenceArrayList(Bundle.java:1075)
          at android.content.Intent.getCharSequenceArrayListExtra(Intent.java:7919)
          at android.content.Intent.migrateExtraStreamToClipData(Intent.java:10774)
          at android.app.Instrumentation.execStartActivity(Instrumentation.java:1617)
          at android.app.Activity.startActivityForResult(Activity.java:4621)
          at android.support.v4.app.BaseFragmentActivityApi16.startActivityForResult(BaseFragmentActivityApi16.java:54)
          at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:68)
          at android.app.Activity.startActivityForResult(Activity.java:4579)
          at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:751)
          at android.app.Activity.startActivity(Activity.java:4940)
          at android.app.Activity.startActivity(Activity.java:4908)
          at com.xyz.testemail.MainActivity.ShareViaEmail(MainActivity.java:508)</p>