I am also having this attachment issue with the Email application.  It
works perfectly fine with the GMail app, which throwing me for a
loop.  My code is as follows:

Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile
(attachmentFile));
startActivity(Intent.createChooser(sendIntent, "MailSender"));

Any ideas as to what's going on?

On Oct 3, 12:23 pm, Sławek <[email protected]> wrote:
> 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 tosendanemailusing nativeemailclient on android
> > > phone.
>
> > > I have tried following ways to add anattachmentto the mail...
>
> > > method--1
> > >IntentsendIntent = newIntent(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 usingemailclient
>
> > I am having the same problem,
> > using the putExtra(Intent.EXTRA_STREAM) appears to work when I see the
> >emailmessage in draft mode.  I can remove it or send but theemail
> > does not include the imageattachment.  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 theattachmentfile 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

Reply via email to