{"action":"created","issue":{"url":"https://api.github.com/repos/BlueFletch/cordova-plugin-honeywell-captuvo/issues/1","labels_url":"https://api.github.com/repos/BlueFletch/cordova-plugin-honeywell-captuvo/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/BlueFletch/cordova-plugin-honeywell-captuvo/issues/1/comments","events_url":"https://api.github.com/repos/BlueFletch/cordova-plugin-honeywell-captuvo/issues/1/events","html_url":"https://github.com/BlueFletch/cordova-plugin-honeywell-captuvo/issues/1","id":55543376,"number":1,"title":"Sample code to initialize the scanner with this library","user":{"login":"TheRobBrennan","id":4030490,"avatar_url":"https://avatars.githubusercontent.com/u/4030490?v=3","gravatar_id":"","url":"https://api.github.com/users/TheRobBrennan","html_url":"https://github.com/TheRobBrennan","followers_url":"https://api.github.com/users/TheRobBrennan/followers","following_url":"https://api.github.com/users/TheRobBrennan/following{/other_user}","gists_url":"https://api.github.com/users/TheRobBrennan/gists{/gist_id}","starred_url":"https://api.github.com/users/TheRobBrennan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheRobBrennan/subscriptions","organizations_url":"https://api.github.com/users/TheRobBrennan/orgs","repos_url":"https://api.github.com/users/TheRobBrennan/repos","events_url":"https://api.github.com/users/TheRobBrennan/events{/privacy}","received_events_url":"https://api.github.com/users/TheRobBrennan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-26T21:55:57Z","updated_at":"2015-01-27T03:36:46Z","closed_at":null,"body":"Hi there! Do you have an example of how to initialize the scanner before using the callback examples in the readme documentation? I see references to \"NOTE: You must register a callback to initialize the hardware.\" but no example for that. \r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/BlueFletch/cordova-plugin-honeywell-captuvo/issues/comments/71584804","html_url":"https://github.com/BlueFletch/cordova-plugin-honeywell-captuvo/issues/1#issuecomment-71584804","issue_url":"https://api.github.com/repos/BlueFletch/cordova-plugin-honeywell-captuvo/issues/1","id":71584804,"user":{"login":"TheRobBrennan","id":4030490,"avatar_url":"https://avatars.githubusercontent.com/u/4030490?v=3","gravatar_id":"","url":"https://api.github.com/users/TheRobBrennan","html_url":"https://github.com/TheRobBrennan","followers_url":"https://api.github.com/users/TheRobBrennan/followers","following_url":"https://api.github.com/users/TheRobBrennan/following{/other_user}","gists_url":"https://api.github.com/users/TheRobBrennan/gists{/gist_id}","starred_url":"https://api.github.com/users/TheRobBrennan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheRobBrennan/subscriptions","organizations_url":"https://api.github.com/users/TheRobBrennan/orgs","repos_url":"https://api.github.com/users/TheRobBrennan/repos","events_url":"https://api.github.com/users/TheRobBrennan/events{/privacy}","received_events_url":"https://api.github.com/users/TheRobBrennan/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T03:36:45Z","updated_at":"2015-01-27T03:36:45Z","body":"Hi Blake,\r\n\r\nThanks for your prompt reply! The part I’m confused on is this example:\r\n\r\ndocument.addEventListener(\"deviceready\", function(){ \r\n       ...\r\n       captuvo.registerScannerCallback(function(barcode){\r\n\r\n           console.log(\"Barcode scanned: \" + barcode);\r\n\r\n           //TODO: handle barcode/label type\r\n       });\r\n       //This function will send the first readable track\r\n       captuvo.registerMagstripeCallback(function(track){\r\n            //track 1 uses carets as dividers (NOTE: won't work if track 2 is read)\r\n            if (track.indexOf(\"%B\") == 0) {\r\n              track = track.split('^');\r\n\r\n              var cc = {\r\n                 number : track[0].substr(2), //strip leading %B\r\n                 name : track[1].trim(),\r\n                 expr : '20' + track[2].substr(0,2) + '-' + track[2].substr(2,2)\r\n              };\r\n            } else {\r\n              //handle track 2\r\n            }\r\n\r\n       });\r\nWhere does the device itself - captuvo - get defined/initialized? I’m curious where that part of the code is. \r\n\r\n\r\n\r\n\r\nRob Brennan |  rob@therobbrennan.com\r\nPhone     (360) 531-3830\r\nSkype The.Rob.Brennan\r\nWeb         http://www.therobbrennan.com\r\n\r\n\r\n> On Jan 26, 2015, at 7:34 PM, Blake Byrnes <notifications@github.com> wrote:\r\n> \r\n> The example in the readme should be all you need. Let me know if you've seen those and still aren't sure what to do.\r\n> \r\n> —\r\n> Reply to this email directly or view it on GitHub <https://github.com/BlueFletch/cordova-plugin-honeywell-captuvo/issues/1#issuecomment-71584633>.\r\n> "}}