cordova-plugin-epson-spectrum
Advanced tools
Comparing version 1.0.44 to 1.0.45
@@ -18,3 +18,3 @@ { | ||
}, | ||
"version": "1.0.44", | ||
"version": "1.0.45", | ||
"scripts": { | ||
@@ -21,0 +21,0 @@ "test": "echo \"Error: no test specified\" && exit 1" |
@@ -17,61 +17,54 @@ # cordova-plugin-epson-spectrum | ||
### Enable listener | ||
```javascript | ||
window.plugins.honeywell.init(function(result) { | ||
console.log('Barcode scanned: ' + result.data); | ||
console.log('Code: ' + result.code); | ||
console.log('Timestamp: ' + result.timestamp); | ||
console.log('Charset: ' + result.charset); | ||
console.log('Aim ID: ' + result.aimId); | ||
}, function (error) => { | ||
console.log('Error occured: ' + error); | ||
}); | ||
### Implemented methods | ||
``` | ||
### Disable listener | ||
```javascript | ||
function disable() { | ||
window.plugins.honeywell.stop(); | ||
} | ||
* addTextAlign | ||
* addText | ||
* addTextLang | ||
* addTextPosition | ||
* addTextSmooth | ||
* addTextFont | ||
* addTextSize | ||
* addTextStyle | ||
* addFeedLine | ||
* addCut | ||
* addBarcode | ||
* addFeedUnit | ||
* addTextRotate | ||
* addHLine | ||
* addSound | ||
``` | ||
### Re-enable listener after being disabled (.stop) | ||
### Print method | ||
```javascript | ||
async function enable() { | ||
await window.plugins.honeywell.start(); | ||
window.plugins.honeywell.init(function(data) { | ||
console.log('Barcode scanned: ' + result.data); | ||
console.log('Code: ' + result.code); | ||
console.log('Timestamp: ' + result.timestamp); | ||
console.log('Charset: ' + result.charset); | ||
console.log('Aim ID: ' + result.aimId); | ||
}, function (error) => { | ||
console.log('Error occured: ' + error); | ||
}); | ||
} | ||
``` | ||
var args = [{ | ||
printer: { | ||
model: "TM-P20", | ||
lineTimeout: 1000, | ||
connectionType: "bluetooth", | ||
autoconnect: true, | ||
address: "00:01:90:72:2A:BE" | ||
}, | ||
builder: [ | ||
{ | ||
method: "addText", | ||
params: [ | ||
{ | ||
index: 0, | ||
value: "SC TEST SRL" + "\n" | ||
} | ||
] | ||
} | ||
] | ||
}]; | ||
### Scan button simulation to enable readings from within your application | ||
Ionic JS/TS methods: | ||
```javascript | ||
scanPressed () { | ||
this.window.plugins.honeywell.softwareTriggerStart(function(data) { | ||
console.log('Software scan: ' + data); | ||
}, function(error) { | ||
console.log('Error occured: ' + error); | ||
}); | ||
} | ||
scanReleased () { | ||
this.window.plugins.honeywell.softwareTriggerStop(); | ||
} | ||
window.plugins.epson.print(function (succes) { | ||
alert("succes: " + succes); | ||
}, | ||
function (err) { | ||
alert("error: " + err); | ||
}, | ||
args); | ||
``` | ||
...and the HTML: | ||
```html | ||
<button (touchstart)="scanPressed()" (touchend)="scanReleased()">SCAN</button> | ||
``` | ||
--- |
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
19
24660532
69