chariotsolutions / phonegap-nfc

PhoneGap NFC Plugin
MIT License
706 stars 559 forks source link

Update NfcPlugin.java #156

Open valemunoz opened 9 years ago

valemunoz commented 9 years ago

modified to read Mifare Classic cards example call

nfc.readMifare(success,error); nfc.readMifareSecBloc(sector,block,success,error);

JohnMcLear commented 9 years ago

Yea you got this wrong, yous hould only have one pull erquest with your javascript and your java in.. Read about using git, it's worth understanding...

Read this too: http://nvie.com/posts/a-successful-git-branching-model/

valemunoz commented 9 years ago

ups

don commented 9 years ago

I think returning the data as Uint8Array would be better than a String since the NFC tag can contain binary data. An array of int or byte would be OK too since that's more consistent with the other API calls in this plugin.

Can you make the catch blocks call the callback failure method where appropriate?

What if the user wants to authenticate with another key? Should the key be an optional parameter?

valemunoz commented 9 years ago

the code only work for default key, but is very simple define a key. I code it and upload it if it works

don commented 9 years ago

@valemunoz sorry I haven't merged this yet, I'll try to test and merge in the next few weeks.

valemunoz commented 9 years ago

OMG I completely forget