Android Inline Images in Email -
any 1 can suggest how add images in email body ? tried it, no answer.
here code:
intent sendintent = new intent(intent.action_send); sendintent.settype("image/jpeg"); sendintent.putextra(intent.extra_email, new string[] { "gmail@gmail.com" }); sendintent.putextra(intent.extra_subject, "photo"); sendintent.putextra(intent.extra_stream, uri.parse("file://" + _path)); sendintent.settype("image/png;text/html"); string htmlecode = "<html><b>bold text works perfectly</b>" + "<img width='48' height='48' alt='' " + "src='http://upload.wikimedia.org/wikipedia/commons/7/7a/basketball.png' />" + "</html>"; sendintent.putextra(intent.extra_text, html.fromhtml(htmlecode, imggetter, null)); startactivity(intent.createchooser(sendintent, "email:"));
wat's wrong in code ?
there similar post here. suggest using:
emailintent.putextra(intent.extra_stream, uri.parse("file:///mnt/sdcard/myimage.jpeg"));
Comments
Post a Comment