hi, mudit try to use file:///sdcard/abc.jpg instead of file://sdcard/abc.jpg
On Aug 13, 3:14 pm, Fin <[email protected]> wrote: > On 7 Aug, 14:25, mudit <[email protected]> wrote: > > > > > hello.. > > > i`m trying tosendan email using native email client on android > > phone. > > > I have tried following ways to add anattachmentto the mail... > > > method--1 > > Intent sendIntent = new Intent(Intent.ACTION_SEND); > > sendIntent.setType("image/jpeg"); > > sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://sdcard/ > > abc.jpg")); > > > method 2 > > > Sending the image as body content--- > > > sendIntent.putExtra(Intent.EXTRA_TEXT, "<HTML><BODY><b><IMG SRC= > > \"data:image/jpeg;base64," + <imagepath> + "\"alt = \"pleaseview this > > image\"/></b></BODY></HTML>"); > > > i can successfully attach the image manually but when i tried to > > attach andsendit programmatically the mail was sent without > > attachement. > > > Please let me know if there is a way tosendanattachment > > programmatically by using email client > > I am having the same problem, > using the putExtra(Intent.EXTRA_STREAM) appears to work when I see the > email message in draft mode. I can remove it or send but the email > does not include the image attachment. I have read that this may be a > bug which is resolved with a reboot but I have tried both a reboot of > the machine and phone I am debugging on along with multiple re- > releases. I can confirm the attachment file exists on the sdcard and > am not recieving any noticable errors from adb logcat. > > Anyone managed to find a usable solution to this? > > Regards, > > Fin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

