Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

problem opening the Gmail application from a Samsung S21 #54

Open
monta85 opened this issue Mar 2, 2023 · 7 comments
Open

problem opening the Gmail application from a Samsung S21 #54

monta85 opened this issue Mar 2, 2023 · 7 comments

Comments

@monta85
Copy link

monta85 commented Mar 2, 2023

Hello,
The problem is that I can't open the Gmail application from my Samsung S21 (Android version 13) even though the application is well installed on my phone but it works fine on Samsung Galaxy S10e (Android version 12) and it works fine on Samsung OnePlus 6 (Android version 11)
I'm sending you the error logs that I have:
I/flutter (20768): at com.homex.open_mail_app.OpenMailAppPlugin.composeNewEmailInSpecificEmailAppIntent(OpenMailAppPlugin.kt:208) I/flutter (20768): #0 StandardMethodCodec.decodeEnvelope package:flutter/…/services/message_codecs.dart:653 I/flutter (20768): #1 MethodChannel._invokeMethod package:flutter/…/services/platform_channel.dart:296 I/flutter (20768): <asynchronous suspension> I/flutter (20768): #2 OpenMailApp.composeNewEmailInSpecificMailApp package:open_mail_app/open_mail_app.dart:200 I/flutter (20768): <asynchronous suspension>

I hope we will have a correction very soon because I need correction and also your Lib is the best compared to the other Libs which have the same context

@monta85
Copy link
Author

monta85 commented Mar 10, 2023

@MisterJimson can you help me to resolve this problem please and update the lib version ?

@MisterJimson
Copy link
Contributor

I no longer am a maintainer of this library and no longer work at the company who owns it. I suggest you use the example app to debug the issue on your device.

@monta85
Copy link
Author

monta85 commented Mar 14, 2023

@diskwriter can you help me to resolved this problem
i will put more log when i have this problem :

E/MethodChannel#open_mail_app(31993): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) E/flutter (31993): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, Unable to find explicit activity class {com.google.android.gm/com.google.android.gm.ComposeActivityGmailExternal}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>?, null, android.content.ActivityNotFoundException: Unable to find explicit activity class {com.google.android.gm/com.google.android.gm.ComposeActivityGmailExternal}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>? E/flutter (31993): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2171) E/flutter (31993): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1805) E/flutter (31993): at android.app.ContextImpl.startActivity(ContextImpl.java:1145) E/flutter (31993): at android.app.ContextImpl.startActivity(ContextImpl.java:1116) E/flutter (31993): at android.content.ContextWrapper.startActivity(ContextWrapper.java:441) E/flutter (31993): at com.homex.open_mail_app.OpenMailAppPlugin.composeNewEmailInSpecificEmailAppIntent(OpenMailAppPlugin.kt:208) E/flutter (31993): at com.homex.open_mail_app.OpenMailAppPlugin.onMethodCall(OpenMailAppPlugin.kt:64) E/flutter (31993): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262) E/flutter (31993): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) E/flutter (31993): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) E/flutter (31993): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/flutter (31993): at android.os.Handler.handleCallback(Handler.java:942) E/flutter (31993): at android.os.Handler.dispatchMessage(Handler.java:99) E/flutter (31993): at android.os.Looper.loopOnce(Looper.java:226) E/flutter (31993): at android.os.Looper.loop(Looper.java:313) E/flutter (31993): at android.app.ActivityThread.main(ActivityThread.java:8757) E/flutter (31993): at java.lang.reflect.Method.invoke(Native Method) E/flutter (31993): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) E/flutter (31993): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) E/flutter (31993): ) E/flutter (31993): #0 StandardMethodCodec.decodeEnvelope package:flutter/…/services/message_codecs.dart:653 E/flutter (31993): #1 MethodChannel._invokeMethod package:flutter/…/services/platform_channel.dart:296 E/flutter (31993): <asynchronous suspension> E/flutter (31993): #2 OpenMailApp.composeNewEmailInSpecificMailApp package:open_mail_app/open_mail_app.dart:202 E/flutter (31993): <asynchronous suspension> E/flutter (31993):

@diskwriter
Copy link
Contributor

@monta85 Looking at the error message, did you check this part? have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>

@monta85
Copy link
Author

monta85 commented Mar 15, 2023

@diskwriter I don't add any activity but when i use composeNewEmailInSpecificMailApp from your lib i have this problem with Android 13 beause it work fine with android 11 and android 12 but with android 13 i have this problem can you check lib please because i think you have a problem with Android 13.
looking forward to your reply

@monta85
Copy link
Author

monta85 commented Mar 15, 2023

@diskwriter I think the problem is in your OpenMailAppPlugin.kt
private fun composeNewEmailInSpecificEmailAppIntent(@NonNull name: String, @NonNull contentJson: String): Boolean {... }
and exactly in
setClassName(specificEmailActivity.activityInfo.packageName, specificEmailActivity.activityInfo.name)
because when i comment this line and i build again application and open Dialog and if you have outlook and gmail and yahoo apps, when you click in app it is outlook that will be open

can you correct this please and update the lib ?

@diskwriter
Copy link
Contributor

@monta85 I am not (and have never been) a maintainer of this library. I suggest you open a PR and start contributing yourself.

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

No branches or pull requests

3 participants