I want an NFC tag to rotate through links every time I tap it

203 Views Asked by At

Right now, all of the NFC apps I'm using that have multiple records write the multiple records. But if I tap on the NFC, I just get the first record. If I use an NFC reader app I get all the records.

Properties I'd like:

  1. Every time user taps they get a different link
  2. A user can't use a NFC reader app and see all the links on the NFC tag
  3. I'd prefer not to have a counter where a user could just increment the url and get the next link

I tried multiple NFC apps, all of stack overflow, chatgpt, etc to get an answer here. I see stuff on the counters but not sure that would solve my problem and haven't been getting that working.

1

There are 1 best solutions below

0
Andrew On

Most normal NFC tags are fairly "dumb" and are more just like storage devices, a few offer additional features like counters, etc but that won't help implement custom logic.

The only solution is to use something like a "Java Card" which has an NFC interface as well. These can be programmed to implement custom logic.

https://github.com/OpenJavaCard/openjavacard-ndef has more details on JavaCard with NFC and the Java applet needed for NFC.