Open Mmisiek opened 3 years ago
can you provide more context? how did does it break?
that error message is unfortunately the same as with #13 / cordova-plugin-email although annoying has been there since forever and does not crash the app.
So basically, when calling FlutterMailer with link to attachment it fails. The email body will be empty and no attachment after I push though.
final MailOptions mailOptions = MailOptions(
body: body,
subject: subject,
recipients: [scoutReport.sendTo],
isHTML: true,
bccRecipients: [],
ccRecipients: [],
attachments: [
pdfFile.path,
],
);
// open emailer
FlutterMailer.send(mailOptions).then((_) {});
I narrowed it down to the first setting of intent:
I/flutter (17760): Using local cached file:/data/user/0/com.pestscope.pestscopemobile/app_flutter/Reports/-94741-1-11.pdf
I/flutter (17760): /data/user/0/com.pestscope.pestscopemobile/cache-94741-1-11.pdf
W/Bundle (17760): Key android.intent.extra.TEXT expected ArrayList
So it does not crash app but makes FlutterMailer unusable to send attachments. In the links I provided there are some workarounds proposed.
I am seeing this issue and the workarounds are Java-specific. The issue is appearing on the newest versions of Android as well.
any solution??
Sending attachments broke recently:
traced error to Android 4 bug: https://stackoverflow.com/questions/15776416/java-lang-classcastexception-android-text-spannablestringbuilder-cannot-be-cast