lube / nfc-react-native

69 stars 35 forks source link

You have example project? #2

Closed thepinyo closed 7 years ago

thepinyo commented 7 years ago

I can not get nfc tag. you have any example project?

lube commented 7 years ago

I'll publish an example project on the weekend!

Raimmaster commented 7 years ago

Hey, man, I've been trying to adapt my own NFC native module for RN, and failed so far. I foud this project, and it looks awesome, though I can't get it to work, since I'm not really sure how you would implement the methods. Basically, when would you automatically detect if an NFC card had just been approached to the Android device? Any help would be appreciated.

lube commented 7 years ago

In our project we just put the reading/writing functions on a redux saga we trigger with a normal redux action, but you could obviously just trigger one of this functions in a lifecycle hook in some container or component.

In retrospective a EventEmitter api would have been better.

mattb2401 commented 7 years ago

In the res folder. where do we place that piece of xml and what is the file name

lube commented 7 years ago

Im working on a update of the lib using event emitters and a sample project, I will publish it near the weekend.

lube commented 7 years ago

Sample project added and API overhaul ready.