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

Paypal is in Mail App Picker (Android) #51

Open
grgkro opened this issue Aug 22, 2022 · 1 comment
Open

Paypal is in Mail App Picker (Android) #51

grgkro opened this issue Aug 22, 2022 · 1 comment

Comments

@grgkro
Copy link

grgkro commented Aug 22, 2022

Hi, I copied the code from here: https://pub.dev/packages/open_mail_app
and it works fine, but among the 3 mail apps that I have installed on my Xiaomi Mi 9T (Android 9 Pie) it also shows me the PayPal app. Do you know why the standard filter could fail?

   `RaisedButton(
      child: Text("Open Mail App"),
      onPressed: () async {
        // Android: Will open mail app or show native picker.
        // iOS: Will open mail app if single mail app found.
        // OpenMailApp.setFilterList(List.of({'paypal'})); // it shows me paypal with or without this line
        OpenMailAppResult result = await OpenMailApp.openMailApp();

        // If no mail apps found, show error
        if (!result.didOpen && !result.canOpen) {
          showNoMailAppsDialog(context);

          // iOS: if multiple mail apps found, show dialog to select.
          // There is no native intent/default app system in iOS so
          // you have to do it yourself.
        } else if (!result.didOpen && result.canOpen) {
          showDialog(
            context: context,
            builder: (_) {
              return MailAppPickerDialog(
                mailApps: result.options,
              );
            },
          );
        }
      },
    ),`

grafik

Thank you and best regards :)

@MisterJimson
Copy link
Contributor

It's been a while since I worked on this (and I am no longer a contributor), but I also noticed this when using and building the library.

PayPal unfortunately registers itself as capable of sending an email.

To filter you can use getMailApps, filter the result yourself, and then use openSpecificMailApp. You would also need to build your own dialog in this case.

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

2 participants