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

Commit

Permalink
Temporary bugfix for Android 12 devices (fixed #130)
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirkula committed Nov 10, 2021
1 parent de749d0 commit 6df63fe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ public static IntentSender Initialize( Context context )
// Maybe FLAG_IMMUTABLE is sufficient but the pre-31 default value was implicitly mutable and I don't trust
// all social apps to work correctly on Android 12+ (API 31+) if I set it to FLAG_IMMUTABLE
//pendingIntentFlags |= PendingIntent.FLAG_MUTABLE;

// Only temporarily set the IMMUTABLE flag to avoid crashes until Android 12 SDK is officially released
// https://github.com/yasirkula/UnityNativeShare/issues/130
pendingIntentFlags |= PendingIntent.FLAG_IMMUTABLE;
}

return PendingIntent.getBroadcast( context, 0, receiverIntent, pendingIntentFlags ).getIntentSender();
Expand Down
Binary file modified Plugins/NativeShare/Android/NativeShare.aar
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.yasirkula.nativeshare",
"displayName": "Native Share",
"version": "1.4.3",
"version": "1.4.4",
"documentationUrl": "https://github.com/yasirkula/UnityNativeShare",
"changelogUrl": "https://github.com/yasirkula/UnityNativeShare/releases",
"licensesUrl": "https://github.com/yasirkula/UnityNativeShare/blob/master/LICENSE.txt",
Expand Down

0 comments on commit 6df63fe

Please sign in to comment.