Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
IshchikGL opened this issue Jul 6, 2023 · 4 comments

Comments

@IshchikGL
Copy link

IshchikGL commented Jul 6, 2023

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)

@bulatsema0
Copy link

bulatsema0 commented Jul 6, 2023

Yes, after the update, I am also unable to build and facing the same issue. It would make me very happy if you could resolve it as soon as possible. Thank you.
FAILURE: Build failed with an exception.

  • Where:
    Build file '/Users/semabulat/.pub-cache/hosted/pub.dev/flutter_email_sender-6.0.1/android/build.gradle' line: 27

  • What went wrong:
    A problem occurred evaluating project ':flutter_email_sender'.

No signature of method: build_edo3asmqw0lh2gxj3hrn5kse0.android() is applicable for argument types: (build_edo3asmqw0lh2gxj3hrn5kse0$_run_closure2) values: [build_edo3asmqw0lh2gxj3hrn5kse0$_run_closure2@411097c9]

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

@Gilianp
Copy link

Gilianp commented Dec 4, 2023

Same here with 6.0.2 version

@teekamsuthar
Copy link

Any update on how you fixed this?

@Gilianp
Copy link

Gilianp commented Dec 27, 2023

It's even worse when the list of available email programs appears, and then the user taps away (closing the list). The app doesn't know about this cancellation gesture. How will I know when this happens? Or better: how I force an specific email app? (like gmail)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants