Attaching a PDF to an Email from Android App - File Size is Zero
I am trying to attach a PDF file called download.pdf to an email in my Android App. I am copying the file first to the SDCard and then attaching it the email. I'm not if relevant, but I am testing on a galaxy tab device. The external storage path returns mnt/sdcard/ My code is as follows : public void sendemail() throws IOException { CopyAssets(); String emailAddress[] = {""}; File externalStorage = Environment.getExternalStorageDirectory(); Uri uri = Uri.fromFile(new File(externalStorage.getAbsolutePath() + "/" + "download.pdf")); Intent emailIntent = new Intent(Intent.ACTION_SEND);