EddyVerbruggen / SocialSharing-PhoneGap-Plugin

👨‍❤️‍💋‍👨 Cordova plugin to share text, a file (image/PDF/..), or a URL (or all three) via the native sharing widget
MIT License
1.78k stars 905 forks source link

Android 12 issue #1201

Open gusmarra opened 1 year ago

gusmarra commented 1 year ago

Hi guys,

I installed the android 12 version cordova-plugin-x-socialsharing-android12. I am having issues trying to build the app. I got the error

requires an android:value or android:resource attribute is anyone else having this issue? Thanks
graphefruit commented 1 year ago

Not this kind of issue, but sharing with android 12 results into crash :<

nxz91 commented 1 year ago

Have any of you been able to resolve this?

viacheslavspasibo commented 1 year ago

The same issue. It crashes on android 12

java.lang.IllegalArgumentException: com.spooorts.hannover: 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.
    at android.app.PendingIntent.checkFlags(PendingIntent.java:382)
    at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:673)
    at android.app.PendingIntent.getBroadcast(PendingIntent.java:660)
    at nl.xservices.plugins.SocialSharing$2.run(SocialSharing.java:274)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
    at java.lang.Thread.run(Thread.java:1012)
EYALIN commented 1 year ago

@graphefruit @nxz91 @viacheslavspasibo @gusmarra it has been fixed in my forked repo: https://github.com/EYALIN/community-cordova-plugin-social-sharing

you can install it as an npm package: cordova plugin add community-cordova-plugin-social-sharing --save