title: Android Send Intent attaching photo from sdcard as 0 length file
body: <p>I know a variant of this question was asked before 
  <a href="https://stackoverflow.com/questions/587917/trying-to-attach-a-file-from-sd-card-to-email/1279574#1279574">trying-to-attach-a-file-from-sd-card-to-email</a>
  But the solution offered, i.e. a reboot doesn't seem to do it for me.  I have seen a good number of group postings which support this being a problem.  I can only assume the OP for the linked to question made some other changes, possibly to the manifest which allowed his code to work.</p>
  
  <p>The behaviour I am seeing is the Email intent handling the attachment of the jpeg from the sdcard but dealing with it as a 0 length file which is discarded when sent.  I have tried setType as jpeg/image and image/jpeg as I have seen it expressed both ways.</p>
  
  <pre><code>Intent sendIntent = new Intent(Intent.ACTION_SEND);
      sendIntent.setType("jpeg/image");
      sendIntent.putExtra(Intent.EXTRA_EMAIL, "me@gmail.com");
      sendIntent.putExtra(Intent.EXTRA_SUBJECT, R.string.email_subjectStart + 
              mWhatYouSpotted.getSelectedItem().toString() +
              R.string.email_subjectEnd);
      sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:/"+ sPhotoFileName));
      sendIntent.putExtra(Intent.EXTRA_TEXT, sEmailBody);
  
      startActivity(Intent.createChooser(sendIntent, "Email:"));
  </code></pre>
  
  <p>Here is the adb logcat I got when I last tested:</p>
  
  <blockquote>
    <p>V/DumbDumpersMain( 3972): sPhotoUri=file://sdcard/DumbDumpers/DumbDumper.jpg I/ActivityManager( 56): Starting activity: Intent { action=android.intent.action.CHOOSER comp={android/com.android.internal.app.ChooserActivity} (has extras) } I/ActivityManager( 56): Starting activity: Intent { action=android.intent.action.SEND type=jpeg/image flags=0x3000000 comp={com.google.android.gm/com.google.android.gm.ComposeActivityGmail} (has extras) } I/ActivityManager( 56): Starting activity: Intent { action=android.intent.action.SEND type=jpeg/image flags=0x2800000 comp={com.google.android.gm/com.google.android.gm.ComposeActivity} (has extras) } D/gmail-ls( 120): MailProvider.query: content://gmail-ls/labels/me@gmail.com(null, null) D/Gmail ( 2507): URI FOUND:file://sdcard/DumbDumpers/DumbDumper.jpg</p>
  </blockquote>
  
  <p>I have been banging my head against this one for over a week now and still cannot determine what is wrong.  Any ideas?</p>