c4-api-cordova-plugin

1.0.3 • Public • Published

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);

});

Package Sidebar

Install

npm i c4-api-cordova-plugin

Weekly Downloads

3

Version

1.0.3

License

none

Unpacked Size

3.83 MB

Total Files

40

Last publish

Collaborators

  • hschindler