cordova-appivo-sibo-nfc
Advanced tools
Comparing version 1.2.3 to 1.2.4
{ | ||
"_from": "cordova-appivo-sibo-nfc", | ||
"_id": "cordova-appivo-sibo-nfc@1.2.3", | ||
"_id": "cordova-appivo-sibo-nfc@1.2.4", | ||
"_inBundle": false, | ||
@@ -57,3 +57,3 @@ "_integrity": "sha512-wEWLPpEskmV+NmF+5EArECfly/kFoodpE5hF9zqGC80ZjYUe8sejBvE2I9zyTPfvxbulICNsoasi7Jz45q8Vxw==", | ||
}, | ||
"version": "1.2.3" | ||
"version": "1.2.4" | ||
} |
@@ -11,2 +11,3 @@ # Fork of cordova-appivo-acr122 | ||
API: | ||
- NOTE: Before calling any of the other methods you need to call initPort method with the port name. | ||
@@ -34,2 +35,15 @@ - read data from a block : | ||
// Access serial port of the reader | ||
nfc.initPort({ | ||
// portName can be 'ttyS2' or 'ttyS3' or any other name based on your model | ||
portName: 'ttyS2' | ||
}).then( | ||
function(result) { | ||
alert(JSON.stringify(result)); | ||
}, | ||
function (error) { | ||
alert(error); | ||
} | ||
); | ||
// Write data onto a tags block | ||
@@ -36,0 +50,0 @@ nfc.write(function(event) { |
@@ -13,2 +13,12 @@ // Empty constructor | ||
NFC.prototype.initPort = function(options) { | ||
return (new Promise(function(resolve,reject){ | ||
cordova.exec(function(str) { | ||
var json = JSON.parse(str); | ||
resolve(json); | ||
}, function(err) { | ||
reject(err); | ||
}, 'NFCPlugin', 'initPort', [options]);})); | ||
} | ||
NFC.prototype.ledOn = function(options) { | ||
@@ -15,0 +25,0 @@ return (new Promise(function(resolve,reject){ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
128928
62
120