I am having a little difficulty. I believe it’s because of my lack of knowledge. The fact is, i have a external library, to run with a external hardware. This library is of that hardware and run some events. I ain’t able to understand how to run this events in my program. follow the code that i am trying to use.
//An example of an implemented proxcard callback is as follows:
grabba.proxcard.registerCallback(proxcardCallbacks, onError);
var proxcardTimeoutFunction = function() {
alert('Proxcard timed out');
};
var proxcardCallbacks = {
//Functions may also be declared inline as seen here.
triggeredEvent: function() {
alert('Proxcard triggered');
},
//These functions are optional and unimplemented functions will simply not be called.
//stoppedEvent : function () {
//alert('Proxcard scanning stopped');
//},
scannedEvent: function(proxcard) {
//proxcard contains data fields
//Convert the data to a base 16 hex string
var hexString = ons.grabba.util.integerArrayToHexString(proxcard.data);
alert('Proxcard scanned event\n Data: ' + hexString + '\n' + "Type: " + proxcard.type);
},
//You may create a function separately as seen with proxcardTimeoutFunction here.
timeoutEvent: proxcardTimeoutFunction
};
I need to scan with the RFID of that hardware. For more information’s, follow the documentation of the library:
http://cordova.grabba.com/legacy/versions/v1.0.18/GrabbaProxcard.html
Thank you for your help.