Skip to content

[Android] Options to send email via email client shows full list of available programs #95

@IshchikGL

Description

@IshchikGL

After switching to version 6.0.1 I see that there is no more "only mail apps" chooser but instead I can send an email via available programs on device.
I receive this stacktrace whenever I call .send method with multiple attachments.

W/Bundle  ( 4877): Key android.intent.extra.TEXT expected ArrayList<CharSequence> but value was a java.lang.String.  The default value <null> was returned.
W/Bundle  ( 4877): Attempt to cast generated internal exception:
W/Bundle  ( 4877): java.lang.ClassCastException: java.lang.String cannot be cast to java.util.ArrayList
W/Bundle  ( 4877): 	at android.os.BaseBundle.getCharSequenceArrayList(BaseBundle.java:1307)
W/Bundle  ( 4877): 	at android.os.Bundle.getCharSequenceArrayList(Bundle.java:1095)
W/Bundle  ( 4877): 	at android.content.Intent.getCharSequenceArrayListExtra(Intent.java:8664)
W/Bundle  ( 4877): 	at android.content.Intent.migrateExtraStreamToClipData(Intent.java:11649)
W/Bundle  ( 4877): 	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1710)
W/Bundle  ( 4877): 	at android.app.Activity.startActivityForResult(Activity.java:5252)
W/Bundle  ( 4877): 	at android.app.Activity.startActivityForResult(Activity.java:5203)
W/Bundle  ( 4877): 	at com.sidlatau.flutteremailsender.FlutterEmailSenderPlugin.sendEmail(FlutterEmailSenderPlugin.kt:171)
W/Bundle  ( 4877): 	at com.sidlatau.flutteremailsender.FlutterEmailSenderPlugin.onMethodCall(FlutterEmailSenderPlugin.kt:72)
W/Bundle  ( 4877): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
W/Bundle  ( 4877): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
W/Bundle  ( 4877): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
W/Bundle  ( 4877): 	at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
W/Bundle  ( 4877): 	at android.os.Handler.handleCallback(Handler.java:883)
W/Bundle  ( 4877): 	at android.os.Handler.dispatchMessage(Handler.java:100)
W/Bundle  ( 4877): 	at android.os.Looper.loop(Looper.java:237)
W/Bundle  ( 4877): 	at android.app.ActivityThread.main(ActivityThread.java:8016)
W/Bundle  ( 4877): 	at java.lang.reflect.Method.invoke(Native Method)
W/Bundle  ( 4877): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
W/Bundle  ( 4877): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)

Reproduces on Samsung S20(Android 10) and Pixel 7(Android 13)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions