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 907 forks source link

Android 12 needs exports on the intent-filter #1155

Open RTK opened 2 years ago

RTK commented 2 years ago

Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.

This plugin registers the following receiver:

      <receiver android:name="nl.xservices.plugins.ShareChooserPendingIntent" android:enabled="true">
        <intent-filter>
          <action android:name="android.intent.action.SEND"/>
        </intent-filter>
      </receiver>

Thus needing the android:exported attribute

ossraju commented 2 years ago

same issue here I am using 6.0.3 version

FilippiMatteo commented 2 years ago

Please resolve Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE

SocialSharing.java final PendingIntent pendingIntent = PendingIntent.getBroadcast(cordova.getActivity().getApplicationContext(), 0, receiverIntent, PendingIntent.FLAG_UPDATE_CURRENT|PendingIntent.FLAG_IMMUTABLE);

FilippiMatteo commented 2 years ago

opened a PR https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/pull/1158

Kenykore commented 2 years ago

Has this issue been solved. I can't upload my app to playstore because of this