开发者

How to attach more than one image and Audio recording file with Image body in Android?

I am new in Android I am trying to send more than 1 images in email body as well as audio recording file. The audio recording file is stored in sdcard as well as images are also stored in sdcard OR I click that using Camera.

I searched on this particular problem and I found that so many people are suffered with the same problem but I dont found the exact answer/ solution.

Can anyone tell me the correct answer. I post my code so that you all people can suggest me my mistake.

Here I want to attach 4 images. In the StringBuffer() I append the path of all images. Please help me I am stuck on this. As well as suggest me that How Can I attach Audio file in the mail?

Thanks.

StringBuffer() strImages开发者_如何转开发 = new StringBuffer();
strImages.append(strImg1_pref);
strImages.append("\n\n");
strImages.append(strImg2_pref);
strImages.append("\n\n");
strImages.append(strImg3_pref);
strImages.append("\n\n");
strImages.append(strImg4_pref);
strImages.append("\n\n");
String strTemp = strImages.toString();

startActivity(Intent.createChooser(new Intent(Intent.ACTION_SEND).setType("image/jpeg").setType("message/rfc822")
   .putExtra(Intent.EXTRA_EMAIL, emails)
   .putExtra(Intent.EXTRA_SUBJECT, subject)
   .putExtra(Intent.EXTRA_TEXT, strDetails).putExtra(Intent.EXTRA_STREAM, Uri.parse(strTemp)), "Send your email in:"));             
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜