ionic-team / capacitor-plugins

Official plugins for Capacitor ⚡️
523 stars 586 forks source link

bug(share): App crash when targeting SDK 31 #690

Closed jcesarmobile closed 2 years ago

jcesarmobile commented 2 years ago

Bug Report

Plugin(s)

share

Capacitor Version

3.3.1

Platform(s)

Android

Current Behavior

App crash when trying to share

Expected Behavior

To not crash

Code Reproduction

https://github.com/ionic-team/capacitor-testapp/blob/main/src/pages/Share.tsx

Other Technical Details

Additional Context

Caused by: java.lang.IllegalArgumentException: com.capacitorjs.app.testapp: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.

jay-babu commented 2 years ago

This should fix the issue: https://github.com/ionic-team/capacitor-plugins/issues/690

jcesarmobile commented 2 years ago

this has been fixed in 4.0.0 beta 0

ionitron-bot[bot] commented 2 years ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.