How can I attach multiple images to mail Composer.
final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("*/*");
ArrayList<Uri> uris = new ArrayList<Uri>();
for (int i = 1; i < alBitmap.size(); i++) {
strFile = strFile + "/" + i + ".jpg";
File fileIn = new File(strFile);
Uri u = Uri.fromFile(fileIn);
uris.add(u);
}
emailIntent.putExtra(Intent.EXTRA_STREAM, uris);
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "");
this.startActivity(Intent.createChooser(emailIntent, "Send mail..."));
But, It gives following error :
java.lang.ClassCastException: java.util.ArrayList cannot be cast to android.os.Parcelable.
Can anybody tell me whats the Solution ? I have also used putArrayListExtra instead of putExtra.