NFC reading using external hardware

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
trevix
Posts: 1096
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

NFC reading using external hardware

Post by trevix » Sun Jan 25, 2026 2:55 pm

I need to add NFC reading abilities to an Android 11 Tv Box. My needed reading is limited to a string from a TAG.
The Tv box does not have the OS software or the hardware for this, so I was thinking of using an external hardware (like the ACR1552U) and creating an extension in LCB, since the current Android NFC of LC10 does not recognize the external NFC hardware.
Before attempting to do this, I am trying to understand why the Android NFC capabilities in LC are listed in the standalone setting, not as an extension.

Is this NFC code embedded in LC? If not, where is it located? Could it be interfering with my project of an extension?

Thanks for any help
Trevix.
Trevix
OSX 15.7 xCode 26.01 LC 10.0.3 RC1 iOS 15> Android 7>

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7416
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: NFC reading using external hardware

Post by jacque » Sun Jan 25, 2026 6:49 pm

Yes, NFC is part of the LC engine, intended for mobile use on Android.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

trevix
Posts: 1096
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Re: NFC reading using external hardware

Post by trevix » Tue Jan 27, 2026 2:55 pm

Hello everybody.
I was able with Claude.AI to create the extension, that uses an external NFC reader to read NFC from LC.

Now I have a much more complicate problem:
When launching the test app, with the external reader connected, the Android 11 OS of the tvBox shows, on the first time, a dialog alert:
"Allow TestNFCHD to access ACR122U PICC Interface?"
In this dialog there is not a "remember" check box.

My problem is that re-booting the Tv Box and, after that, launching again the Test app, I get again the same dialog box.
That is, it does not behave like Bluetooth, camera, etc permissions, when it ask you only once.
I understand that in this case is different then other permissions.

I tried to put a "usb_device_filter.xml" file on the "res" folder of the extension and on the Android runtime of LC10, also modifying the runtime Manifest, but I get an error when trying to install the test stack (see attached image).
Probably because there is already a "nfc_tech_filter.xml" file, in the runtime folder?!?

I confess that I don't understand any of this. Claude.AI suggests the following: "LiveCode selectively includes only specific XML files (not all of them)".
Is there any solution?
Thanks.
Trevix
Attachments
Screenshot 2026-01-27 alle 10.26.58.png
Trevix
OSX 15.7 xCode 26.01 LC 10.0.3 RC1 iOS 15> Android 7>

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7416
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: NFC reading using external hardware

Post by jacque » Tue Jan 27, 2026 6:17 pm

I've never tried that, so your bestie bet is to contact LC support and see if they can help.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

trevix
Posts: 1096
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Re: NFC reading using external hardware

Post by trevix » Wed Jan 28, 2026 12:47 pm

Solved using Macrodroid and a DEX file (Javascript byte code) that runs via shell command with root.
Now the dialog, after reboot, does not appear anymore after the first time.
So long.
Trevix
OSX 15.7 xCode 26.01 LC 10.0.3 RC1 iOS 15> Android 7>

Post Reply