{"id":7848,"date":"2013-10-01T12:56:33","date_gmt":"2013-10-01T16:56:33","guid":{"rendered":"http:\/\/blog.xamarin.com\/?p=7848"},"modified":"2013-10-01T12:56:33","modified_gmt":"2013-10-01T16:56:33","slug":"industrial-strength-barcode-scanning","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/xamarin\/industrial-strength-barcode-scanning\/","title":{"rendered":"Industrial Strength Barcode Scanning"},"content":{"rendered":"<p>\t\t\t\t<a href=\"http:\/\/www.scandit.com\"><img decoding=\"async\" class=\"alignright\" alt=\"\" src=\"https:\/\/ssl.scandit.com\/account\/assets\/scandit_logo-e98fb2d2370474f0615e5c2fd85eccfc.png\" width=\"169\" height=\"41\" \/><\/a><\/p>\n<p>Barcode scanning will likely go down as one of the first killer business apps in the smartphone revolution: <a href=\"http:\/\/usatoday30.usatoday.com\/tech\/products\/2011-02-21-barcode-scanners_N.htm\">QR codes crossed over into mainstream culture<\/a>, <a href=\"http:\/\/retailtechnologytrends.com\/2011\/03\/16\/2011-11-mobile-barcode-scanning-in-store\/\">shoppers can scan items in stores for competitive pricing information<\/a>, and the list goes on. It&#8217;s an easy technology to add, and it demos really well. It comes with its own challenges, however: slow scanning times, difficulty in low-light situations, trouble reading barcodes scanned at an off-angle, or reading barcodes printed on irregular surfaces, like a plastic bag. These hiccups can drive users mad with frustration.<\/p>\n<p><img decoding=\"async\" class=\"alignleft\" alt=\"\" src=\"http:\/\/www.scandit.com\/wp-content\/uploads\/2012\/06\/three_phones_225.png\" width=\"200\" height=\"233\" \/>Scandit&#8217;s bar code scanning library, <a href=\"http:\/\/components.xamarin.com\/view\/scandit\/\">now available on the Xamarin Store<\/a>, addresses these issues. They pack a lot of impressive technology into their library. I&#8217;ve run my own tests with it using both an iPhone 4S and a ZTE Warp Sequent Android phone. The hardware in both of these phones is a couple of generations old. Even still, Scandit read many barcodes without requiring the phone&#8217;s camera to first focus on the symbol. That&#8217;s especially good, because my Warp Sequent has a fixed-focus lens. Scandit even identified many barcodes while the barcode was still gently moving. In all of these tests, I didn&#8217;t have to resort to turning on the camera&#8217;s LED light.<\/p>\n<p><strong>To learn more, join Xamarin\u2019s Zack Gramana and Scandit\u2019s Christian Floerkemeier for a webinar on October 15, 8:00 AM Pacific on using Scandit in your Xamarin apps.<\/strong>\n<a href=\"http:\/\/resources.xamarin.com\/enterprise-grade-barcode-scanning-with-scandit.html\" class=\"action-button featured more\" target=\"_blank\">Register<\/a><\/p>\n<p>Getting the library up-and-running is quick and easy. Just a few simple lines do the job. On iOS, it looks like:<\/p>\n<pre class=\"lang:csharp decode:true\">\n\/\/ Setup the barcode scanner\npicker = new ScanditSDKRotatingBarcodePicker (appKey);\npicker.OverlayController.Delegate = new OverlayControllerDelegate(picker, this);\n\/\/ Show the scanning UI.\nPresentViewController (picker, true, null);\n\/\/ Start looking for barcodes.\npicker.StartScanning ();\n<\/pre>\n<p>On Android, it looks like:<\/p>\n<pre class=\"lang:csharp decode:true\">\n\/\/ Setup the barcode scanner\npicker = new ScanditSDKAutoAdjustingBarcodePicker (this, appKey, ScanditSDKAutoAdjustingBarcodePicker.CameraFacingBack);\npicker.OverlayView.AddListener (this);\n\n\/\/ Start the scanning\npicker.StartScanning ();\n\n\/\/ Show the scan user interface\nSetContentView (picker);\n<\/pre>\n<p>Scandit provides additional customization options, such as a search bar, toolbar, touch button, etc. On iOS, you can &#8220;warm up&#8221; the picker so that it starts up faster by calling <code>SIBarcodePicker.Prepare (appKey, SICameraFacingDirection.Back);<\/code>. The iOS 7 version has a some additional enhancements made available by changes Apple made to the SDK to further improve performance.<\/p>\n<p>Processing the results of a successful scan are just as easy. On Android, the callback looks like:<\/p>\n<pre class=\"lang:csharp decode:true\">\npublic void DidScanBarcode (string barcode, string symbology) {\n\tConsole.WriteLine (&quot;barcode scanned: {0}, '{1}'&quot;, symbology, barcode);\n\n\t\/\/ stop the camera\n\tpicker.StopScanning ();\n}\n<\/pre>\n<p>and on iOS it looks like:<\/p>\n<pre class=\"lang:csharp decode:true\">\npublic override void DidScanBarcode (SIOverlayController overlayController, NSDictionary barcode) {\n\tConsole.WriteLine (&quot;barcode scanned: {0}, '{1}'&quot;, barcode[&quot;symbology&quot;], barcode[&quot;barcode&quot;]);\n\n\t\/\/ stop the camera\n\tpicker.StopScanning ();\n}\n<\/pre>\n<p>The value of <code>symbology<\/code> will be a string identifier such as <code>UPC12<\/code>, <code>QR<\/code>, or one of the other 9 symbologies that they support.<\/p>\n<p>Perhaps one the more intriguing aspects of Scandit&#8217;s offering is the analytics they provide you, which they call <em>Scanalytics<\/em>, via their control panel. Here you can see if scans were made in a retail store or not, top products scanned, top categories, and even scan volume by country. They also offer <a href=\"http:\/\/www.scandit.com\/support\/getting-started-with-the-scandit-product-api\/\">a product lookup web API<\/a> that provides product details for hundreds of thousands of UPC codes. These additional data services round out what is already an impressive offering.<\/p>\n<p><strong><strong>To learn more, join Xamarin\u2019s Zack Gramana and Scandit\u2019s Christian Floerkemeier for a webinar on October 15, 8:00 AM Pacific on using Scandit in your Xamarin apps.<\/strong><\/strong>\n<a href=\"http:\/\/resources.xamarin.com\/enterprise-grade-barcode-scanning-with-scandit.html\" class=\"action-button featured more\" target=\"_blank\">Register<\/a>\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Barcode scanning will likely go down as one of the first killer business apps in the smartphone revolution: QR codes crossed over into mainstream culture, shoppers can scan items in stores for competitive pricing information, and the list goes on. It&#8217;s an easy technology to add, and it demos really well. It comes with its [&hellip;]<\/p>\n","protected":false},"author":579,"featured_media":39167,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2,3],"tags":[4],"class_list":["post-7848","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developers","category-enterprise","tag-xamarin-platform"],"acf":[],"blog_post_summary":"<p>Barcode scanning will likely go down as one of the first killer business apps in the smartphone revolution: QR codes crossed over into mainstream culture, shoppers can scan items in stores for competitive pricing information, and the list goes on. It&#8217;s an easy technology to add, and it demos really well. It comes with its [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/7848","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/users\/579"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/comments?post=7848"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/7848\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media\/39167"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media?parent=7848"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/categories?post=7848"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/tags?post=7848"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}