1.0.3 • Published 5 years ago

c4-api-cordova-plugin v1.0.3

Weekly downloads
15
License
-
Repository
github
Last release
5 years ago

C4 aPI Cordova Plugin

Cordova Plugin for ID Tronic C4 Red on iOS and Android.

Use:

const that = this;

(window).C4ApiCordovaPlugin.getFirmware(function(result: ArrayBuffer) { console.log('Firmware: ', result);

// show on ui
if (result) {
    that.zone.run(()=> {
        that.firmware = String.fromCharCode.apply(null, new Uint8Array(result));
    });
    
    console.log('Firmaware converted: ',  that.firmware);
}

}, function(error) { console.log('Firmware error: ', error); that.firmware = error; });

UHF inventory (TID):

const that = this;

(window).C4ApiCordovaPlugin.startInventory(function(result) {

that.zone.run(()=> {
    that.tidList = result;
    console.log('Inventory result : ', result);
    (<any>window).C4ApiCordovaPlugin.stopInventory();
});

}, function(error) { console.log('startInventory error: ', error);

});