GithubHelp home page GithubHelp logo

outsystemsexperts / cordova-plugin-honeywell-captuvo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from damian-tarnawsky/cordova-plugin-honeywell-captuvo

0.0 4.0 0.0 30.76 MB

This plugin supports barcode scanning, magstripe reads and monitoring battery levels on the Honeywell Captuvo sled.

License: Apache License 2.0

Objective-C 98.75% JavaScript 1.25%

cordova-plugin-honeywell-captuvo's Introduction

Cordova Honeywell Captuvo Plugin

This is a Cordova/Phonegap plugin to interact with Honeywell Captuvo sled for iPhones, iPod Touches and iPad Minis (https://www.honeywellaidc.com/en-US/Pages/Product.aspx?category=enterprise-sleds-for-apple-devices&cat=HSM&pid=CaptuvoSL22). The plugin works by interacting with the native SDK provided by Honeywell to handle barcode scans and magstripe reads.

NOTE 1: the SL62 has a different SDK that needs to be swapped out in this plugin

NOTE: this plugin includes version 3.04.1425 of the SL42 SDK. You must independently agree to the EULA from HoneyWell.

============

This plugin is compatible with plugman. To install, run the following from your project command line: $ cordova plugin add https://github.com/damian-tarnawsky/cordova-plugin-honeywell-captuvo.git

============

To Use:

Register for callbacks for barcode scanning and/or magnetic stripe reads:

   document.addEventListener("deviceready", function(){ 
       ...
       captuvo.registerScannerCallback(function(barcode){
           
           console.log("Barcode scanned: " + barcode);
           
           //TODO: handle barcode/label type
       });
       //This function will send the first readable track
       captuvo.registerMagstripeCallback(function(track){
       	    //track 1 uses carets as dividers (NOTE: won't work if track 2 is read)
       	    if (track.indexOf("%B") == 0) {
              track = track.split('^');
            
              var cc = {
                 number : track[0].substr(2), //strip leading %B
                 name : track[1].trim(),
                 expr : '20' + track[2].substr(0,2) + '-' + track[2].substr(2,2)
              };
            } else {
              //handle track 2
            }
		
       });
       

=============

More API options:

Battery Monitor
``` captuvo.registerBatteryCallback(function(level){ console.log("BATTERY: " + level + " of 4"); }); ```
Ready Events
Document level events will be broadcast to let you know when the hardware is ready. ``` document.addEventListener("magstripeReady", function(){ console.log("MSR READY"); }); ```
Events:
* `magstripeReady` - the magnetic stripe hardware is ready for swipes. NOTE: You must register a callback to initialize the hardware. * `scannerReady` - the barcode scanner is ready for scans. NOTE: You must register a callback to initialize the hardware. * `captuvoConnected` - the captuvo sled is connected and ready for use. NOTE: this event will not fire if your app is launched after the device is already in the sled * `captuvoDisconnected` - the captuvo sled has been disconnected

============== Copyright 2014 BlueFletch Mobile

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

cordova-plugin-honeywell-captuvo's People

Contributors

blakebyrnes avatar damian-tarnawsky avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.