-
Notifications
You must be signed in to change notification settings - Fork 905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error socialsharing.share(...) Android 12 #1176
Comments
great stuff. This resolved the issue. Please merge this code on the next release. Thanks |
@jeanluck36 @sachithd ok, but the build with this plugin still fails receiving this error: |
@jeanluck36 @sachithd I am facing the same issue |
In the plugin.xml file manually added
|
To anyone who got here recently:
|
I have the same error, and also the error about android:export=true. The plugin seems dead. Is there any alternative with updates for the latest android? |
Change for Android-12, EddyVerbruggen#1176
It fix the issue for you? For me, I can't even build. I'm still seeing the message:
|
@EddyVerbruggen can you please merge the pr for the solution for Android 12,13 ? |
1 similar comment
@EddyVerbruggen can you please merge the pr for the solution for Android 12,13 ? |
I am also facing the same issue. |
@Topiya the fix was merged. please remove the plugin and add it again. |
Thanks for the reply. |
Same case as @Topiya, seems like the latest plugin is still not adding |
@sachithd @Syahrul @timonjagi @vchabal @Topiya @pedropamn @bonjourjoel @jeanluck36 you can install it as an npm package: |
Does I am getting the following for our app by the MobSF static analyzer:
|
In Android 12 after trying to use method socialsharing.share(...) the application closes immediately, in android studio shows this error in the log:
To solve this I had to go to android folder in the plugin, find SocialSharing.java, and replace this line:
final PendingIntent pendingIntent = PendingIntent.getBroadcast(cordova.getActivity().getApplicationContext(), 0, receiverIntent, PendingIntent.FLAG_UPDATE_CURRENT);
With this code
int pendingIntentValueFLAG = 0; if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) { pendingIntentValueFLAG = PendingIntent.FLAG_MUTABLE; } else { pendingIntentValueFLAG = PendingIntent.FLAG_UPDATE_CURRENT; } final PendingIntent pendingIntent = PendingIntent.getBroadcast(cordova.getActivity().getApplicationContext(), 0, receiverIntent, pendingIntentValueFLAG);
Cordova and plugin version:
"cordova": "11.0.0"
"cordova-android": "^10.1.2"
"cordova-plugin-x-socialsharing": "^6.0.3"
The text was updated successfully, but these errors were encountered: