tschoffelen / react-native-email-link

📭 Open an email client from React Native (for 'magic link' type functionality).
MIT License
394 stars 70 forks source link

No longer working on android #107

Closed ahtokca closed 2 years ago

ahtokca commented 2 years ago

When I use openInbox then I see in the logcat

 AppsFilter: interaction: PackageSetting{62a2d58 app.package/10165} -> PackageSetting{5566446 com.google.android.gm/10132} BLOCKED

Looks like it is broken by recent security changes on android

tschoffelen commented 2 years ago

Please ensure to follow the instructions in the README to whitelist your application for opening email apps.

ahtokca commented 2 years ago

@tschoffelen thanks for the rapid answer. but please don't jump to conclusions. The package stopped working out of the blue. I checked https://github.com/includable/react-native-email-link#readme and found nothing about any whitlist. Could you please help me sort it out?

ahtokca commented 2 years ago

Please ensure to follow the instructions in the README to whitelist your application for opening email apps.

Well it requires QUERY_ALL_PACKAGES permission on android 30+ (which is not in here). It seems like whitelisted query is not good anymore :( The permission is a big thing to get approved nowadays.

tschoffelen commented 2 years ago

That is weird, the query as is used to work fine on Android 11 and 12.

You wouldn't want to switch to query_all_packages permission though, rather you'd specify each of the individual packages (email clients) you wish to support. We do something similar for iOS: https://github.com/includable/react-native-email-link/blob/master/README.md?plain=1#L48

tschoffelen commented 2 years ago

And apologies for being a bit too over-eager in closing this issue!

ahtokca commented 2 years ago

@tschoffelen figured out. That's some how stale version in node_modules/ without queries in manifest so npm ci helped works now

ahtokca commented 2 years ago

@tschoffelen it can be closed, version 1.14 works just fine. For it was something with upgrading from 1.10 to 1.14 what went wrong