chariotsolutions / phonegap-nfc

PhoneGap NFC Plugin
MIT License
703 stars 547 forks source link

Update NfcPlugin.java for sdk 31+ compatibility #482

Open FConstantMovework opened 1 year ago

FConstantMovework commented 1 year ago

Adding mutable flag (Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent while placing Call)

maximdjorosoft commented 1 year ago

The NFC addTagDiscoveredListener is still not firing, even with this fix. Used to work before.

FConstantMovework commented 1 year ago

Thi fix is meant to ensure compatibility with android 12. Without it any app using the plugin on android 12 will crash at start. About the non firing addTagDiscoveredListener it should be related to some dependecies because in every of my applications I'm using it and it's working well. Let me know if you would like more details about it.