Attaching an drawable image to email in android -


i have list of drawable images in application , want send 1 of images through mail. code looks like

intent sendintent = new intent(intent.action_send); sendintent.settype("image/*"); sendintent.putextra(intent.extra_subject, "picture");                        sendintent.putextra(intent.extra_stream,                     uri.parse(lstphotos.get(newposition).getphotourl())); myactivity.startactivity(intent.createchooser(sendintent, "email:")); 

but in above code have problem since cannot image uri list of drawables. can me how send image because if use above code getting empty image of 0kb sent.

you can saving image temporary location on internal/external cache directory image , use image's path in attachment using uri.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -