Hi i am doing an app in phonegap which need to have multiple attachment but i am unable to have multiple attachment. Any solution for this. My code are as below:
The error is in the line
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(body));
The problem is that HTML.fromHtml(body) returns a android.text.SpannableStringBuilder which cannot be casted to java.util.ArrayList. Try to replace that line of code with
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(body).toString());
or with
ArrayList list = new ArrayList();
list.add(Html.fromHtml(body).toString());
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, list);