title: Android Attachments are not sent by email
body: <p>I'm developing and android app, and at certain point i want to allow the user to send a .csv file by email. 
  I've seen a lot of tutorials in the web, and all of them have the same code, the same code i've tryed many times. The thing is, the send email activity starts, the attachment appears in the email, but when it is sent, the file or goes empty to the destination, or doesn't appear in the destination at all.</p>
  
  <p>Here is some piece of code:</p>
  
  <pre><code>File file = null;
  File dir = ProjectViewerResume.this.getCacheDir();
  if (dir.canWrite()){
      file = new File(dir, ProjectViewerResume.this.mProject.getName()+".csv");
      FileOutputStream out = new FileOutputStream(file);
      out.write(csv.toString().getBytes());
      out.close();
  }
  Uri u1 = null;
  
  u1 = Uri.fromFile(file);
  
  Intent sendIntent = new Intent(Intent.ACTION_SEND);
  sendIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
  sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Project Resume: "+
                  ProjectViewerResume.this.mProject.getName());
  sendIntent.putExtra(Intent.EXTRA_STREAM, u1);
  sendIntent.setType("text/csv");
  startActivity(sendIntent);
  </code></pre>
  
  <p>The csv variable has file content in csv format.
  I've omited the try..catch so the code seems cleaner..</p>
  
  <p>Thks in advance</p>