Kastri icon indicating copy to clipboard operation
Kastri copied to clipboard

Expand NFC support

Open DelphiWorlds opened this issue 5 years ago • 9 comments

Add reading of tag ids etc as per Brian Long's work:

http://blong.com/Articles/Delphi10NFC/NFC.htm

DelphiWorlds avatar Aug 03 '20 09:08 DelphiWorlds

Hello my friend, you will add this feature to get the tags ids soon?

samuelsoarees avatar Jun 21 '22 19:06 samuelsoarees

Thanks for the reminder.. I'll have a look at doing this within the next week or so

DelphiWorlds avatar Jun 22 '22 20:06 DelphiWorlds

Oops.. bit more than a week. Looking at this before the end of the weekend

DelphiWorlds avatar Jul 08 '22 00:07 DelphiWorlds

Changes for reading tag ids have been added. Just for Android at present. Please report any issues/feedback in this issue

DelphiWorlds avatar Jul 08 '22 01:07 DelphiWorlds

Hello my friend, i have tested this feature and worked. Thanks so much

samuelsoarees avatar Jul 12 '22 17:07 samuelsoarees

Hello, Has somebody tried to find a solution for IOS?

staa21 avatar Feb 10 '25 07:02 staa21

It has not been implemented in Kastri, however it appears it will be possible,

DelphiWorlds avatar Feb 10 '25 07:02 DelphiWorlds

I have tried to find a solution for this and extended the following procedure in dw.nfc.ios: procedure TPlatformNFCReader.readerSessionDidDetectNDEFs(session: NFCNDEFReaderSession; didDetectNDEFs: NSArray);

the following code lead to a crash: var p:Pointer; p:=session.valueForKey(StrToNSStr('_foundTags')) Any idea how to access the session and the found tags in it? My idea is to get the tagid such as in this post: https://stackoverflow.com/questions/45946443/how-to-get-the-tag-identifier-in-core-nfc

staa21 avatar Feb 10 '25 12:02 staa21

My idea is to get the tagid such as in this post:

As per that post, the code they're using may be rejected by Apple. I am looking at other code in order to implement this.

For my own reference (and perhaps others who are interested), I am looking at these examples:

https://github.com/semlette/nfc_in_flutter/issues/69 https://medium.com/@lrunhem/detect-nfc-tags-on-ios-13-bd43dcf68a4e

DelphiWorlds avatar Feb 11 '25 22:02 DelphiWorlds