Android Studio Build Failure after configuring NFC in Mendix Native App

0
Hello Everyone !    We are facing an issue while building a Mendix Native mobile application after implementing NFC functionality using a Native JavaScript Action.   Steps Followed : Implemented NFC using the Mendix documentation for Native JS Actions:https://docs.mendix.com/howto/extensibility/create-native-javascript-action/ Followed the official Mendix documentation to build the Native Mobile App locally:https://docs.mendix.com/howto8/mobile/native-build-locally/ The configuration works successfully inside Mendix Studio Pro. When we open the project in Android Studio and try to build or run the app, it fails with an error (please refer to the attached screenshot below).   Any guidance or pointers to resolve this would be very helpful.        
asked
1 answers
0

Hi Dheeraj R Sangur

The method NfcAdapter.setNdefPushMessage() has been deprecated and removed in newer Android versions. That’s why Android Studio shows an error — it no longer exists in the current SDK.sadly there isn’t a direct replacement for peer‑to‑peer NDEF push. Instead, you need to use the newer NFC APIs depending on your use case.

You can import the latest npm package of NFC where this method is removed, I check it in NPM Home so updating the npm package should work.

 

I hope it helps

answered