-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to make this plugin work #12
Comments
@Vartex05 any luck in integrating this with Ionic? I found a fork of the phonegap NFC plugin that adds HCE support: https://github.com/jalbersol/phonegap-nfc Did you manage to get anything working? |
Nothing so far :/ Did u find out how to make it work? Or some other example/solution? |
I made a fork of the original phonegap-nfc plugin and built in some of the ideas from jalbersol/phonegap-nfc (as it was far too long winded and difficult to properly rebase). From there, I abandoned the project as we've changed paths our end. If you'd like to pick it up, let me know. I think you'll need to change the way the phonegap-nfc plugin starts the NFC functionality (to prevent Android Beaming).
|
Ah, thats a pity, iam a little lost in this, a working example or some tutorial how to make it work would really help me. |
@Vartex05 There is a demo app that uses the Google card reader sample see https://github.com/don/cordova-plugin-hce#hce-demo-app |
yea i saw that, but i dont really understand, how do i know which aid to use. Or where do i get this APDU command. I want to emulate mifare tag. |
HCE emulates smart cards. APDU commands are the commands used exchange of data between the reader and the card. The reader will send you a command and you need to respond. To do this you'll need to get the Mifare Classic specification and implement many of the commands for things like get uid, handing keys, authenticate sector, read block, write block, etc. This is a lot of work to implement. You'll need an intimate understanding of the inner working of Mifare. If you're luck you can find another implementation and port it over. This plugin was written for one customer's specific needs. There might be other commands you can use to implement what you want in the Android SDK. See the Host-based Card Emulation docs If you're looking to just send data from Android to a NFC reader the Peer to Peer sharing NDEF messages is a much easier way to go. |
Hi @don, Right now, I tried with your example cordova code and with ionic but "registerCommandCallback" never fires. I don't know why... My second device is in NFC Read mode (NFC Tools app from Google Play) This is my code: .... `import { HCE } from '@ionic-native/hce'; @component({ constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, public hce: HCE) {
} onCommand(command){ /// never fires here... When you said
It can do in JS only or need do in the both code (js and java plugin) Your plugin works without "cordova-plugin-hce" java plugin? Thanks a lot, Regards |
I have met the same problem as you. My English is not very good. I can only say something about it. |
Hello, I read your reply, you said that plug-in is no problem, do you successfully implement it, I need to use mobile phones to simulate M1 card, see your reply you should be a Chinese, do you have similar functions to achieve? |
Has anyone experience with this plugin ? I would like to make it work, but iam a little lost. Actual example would be nice. Iam trying to make ionic app, that will emulate nfc tag, but so far i was unsuccesful :(
The text was updated successfully, but these errors were encountered: