react-native-nfc-manager icon indicating copy to clipboard operation
react-native-nfc-manager copied to clipboard

Can i scan tag without button click event?

Open kojoo112 opened this issue 2 years ago • 10 comments

I want to scan tag without button click event.

how can i do it?

please tell me

Phone: Galaxy S10 5G

kojoo112 avatar Apr 14 '22 04:04 kojoo112

Example code provided in readme should do the trick 🤔

ShiriNmi1520 avatar May 05 '22 04:05 ShiriNmi1520

@ShiriNmi1520 The example you linked to uses an onPress event.

I also don't get how you are supposed to read tags without attaching the processing logic onto another UI event. Do I need to use NFCManager.ndefHandler and the likes? I find the examples a bit vague.

Aurum-Vale avatar May 05 '22 08:05 Aurum-Vale

@Helicosaurus-Rex Just found a PR mention about updating example code that didn't merge #470, I'll dig into it

ShiriNmi1520 avatar May 05 '22 08:05 ShiriNmi1520

Thanks! I'll dig into it as well.

Aurum-Vale avatar May 05 '22 09:05 Aurum-Vale

@kojoo112 @Helicosaurus-Rex I've created an example project using expo bare workflow and some code from #470 that reads NFC tag and display its ID without clicking anything, sees if this helps or need any improvement

ShiriNmi1520 avatar May 05 '22 09:05 ShiriNmi1520

Huge thanks! I should be able to make it work from here.

Aurum-Vale avatar May 05 '22 09:05 Aurum-Vale

@ShiriNmi1520 THANK YOU SOOOOOOOOO MUCH!!!!

kojoo112 avatar May 06 '22 06:05 kojoo112

No problem, let me know if there's another problem and I'll try to figure it out :)

ShiriNmi1520 avatar May 06 '22 07:05 ShiriNmi1520

@ShiriNmi1520 If the setEventListener method is used and nfcVHandler's transceive method is used, a "No tech request available" warning will appear

yfs-2000 avatar May 24 '22 05:05 yfs-2000

@ShiriNmi1520 If the setEventListener method is used and nfcVHandler's transceive method is used, a "No tech request available" warning will appear

I'll look into it

ShiriNmi1520 avatar May 24 '22 11:05 ShiriNmi1520

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Aug 23 '22 02:08 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Sep 07 '22 02:09 github-actions[bot]