Open clarklight opened 3 years ago
For anyone facing this issue, this will save you sometime. After API level 29, the feature is deprecated, and they are slowing moving away from NDEF file transfer method.
https://developer.android.com/reference/android/nfc/NfcAdapter
boolean | isNdefPushEnabled()This method was deprecated in API level 29. this feature is deprecated. File sharing can work using other technology like Bluetooth.
Any workarounds?
@SamuelMichelRiad In that documentation, they suggest people to switch over to use Bluetooth for data transfer. Which was the work around i did in the end. If you thinking of using the NFC for pushing data to a NFC card etc should still works fine. But beaming between 2 devices, that needs to be transfer to bluetooth which should be able to perform 100% the same functionality.
I am trying to use the .share() function, but in the error callback it is showing NDEF_PUSH_DISABLED.
Do i need to set anything in the config to enable this? As Android Beam is removed, there is no more setting page for me to enable this setting in the device or popup to ask user for permission.
I am building on Cordova android 10.0.1 testing on Android 11 device.
Thanks!