I want to attach a file to a mail .... This is the thing that i I tried what he replied, but he did not fix it. Here is my code please use ACTION_SENDTO It works fine when I send mail without an attachment, but when I try to attach a file it gives exception (
android.content.ActivityNotFoundException ) like the following link I have tried:
Ury mail = Uri. From Ports ("Mail", Message, Empty); Intention Email Intent = New Intent (Intent.ACTION_SENDTO, Mail); EmailIntent.putExtra (Intent.EXTRA_SUBJECT, sub); EmailIntent.putExtra (Intent.EXTRA_TEXT, mailcontent); EmailIntent.setData (Uri.parse ("File: //" + Environment. GetIntileStories Directory ("+ / AB.JPG")); EmailIntent.setType ("Image / JPG"); StartActivity (emailIntent);
element emailintent = new intent (android.content.Intent ACTION_SEND);
and EmailEntent. Input Extra (Intent.EXTRA_STREAM, uri);
No comments:
Post a Comment