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
Post a Comment