PUBLIC WARNING! Barcode scanning in Xamarin Forms

BACKGROUND:
We are building a Xamarin Forms product that uses barcode scanning as a central function. In the early stages we decided not to buy a barcode scanning component, but use the free ZXing component until later in the development phase. We are now at the stage where we would want to buy and use a commercial barcode scanning component as the sample apps they provide indicate a clear performance advantage.

PROBLEM:
Of the three commercial components in the Xamarin Components Library there are exactly 0 that can be used in a Xamarin Forms solution:

  1. RedLaser does not exist any more (sign-up page closed, emails sent to them bounce back)
  2. Scandit does not support XF ( as per an email response from them)
  3. Manatee does not support XF either (also stated in an email response)

SOLUTION:
Write a wrapper for Scandit or Manatee. I found a wrapper for Scandit, but actually prefer Manatee's pricing model.
I have tried to write a wrapper my self, but it seems I am doing it wrong since calling the Scan() method just crashes my app without ANY debugging information at all. If this fails, the project will be in jeopardy.

If you want to build an app that scans barcodes, makes sure you investigate the lack of Xamarin Forms support before starting!

Posts

  • OtaMaresOtaMares DEMember ✭✭

    Maybe this helps https://github.com/rebuy-de/rb-forms-barcode its our own barcode scanning library based on zxing.

  • SteveKeane.9277SteveKeane.9277 GBBeta ✭✭
    edited September 2015

    I used ZXing.Net.Mobile quite successfully with a simple interface called IQRScanner with one method

    Task<string> Scan(); 

    and implemented it as a dependency in the iOS and Android code branches.

    Accuracy seems good and the UI was OK too (I did not customise the UI apart from prompt text).

    Top Tip: dont use the built in AVCaptureSession (iOS7 Built in) in iOS - its rubbish. Stick with the default ZXing capture engine, its much better.

  • JasonAwbreyJasonAwbrey USInsider, University, Developer Group Leader mod

    We are using barcode scanning in our XF project via DI - Scandit on the Android side, native iOS scanning on the iOS side.

    There are a LOT of things that XF does not support out of the box, but are easily achieved via DI or custom renderers.

  • BrianRepettiBrianRepetti USUniversity ✭✭✭

    I use zxing heavily. Not sure you have any idea what your talking about.

  • cvarelaecvarelae USMember ✭✭

    @JasonAwbrey How do you use to a native iOS scanning from a xamarin ios project? Thanks a lot

  • Everything is compatible with xamarin forms, you only have to use the dependency service to make it work

  • ManateeWorksManateeWorks USMember

    The Manatee Works Barcode Scanner SDK Xamarin package within our Developer Network now contains demonstration/sample source code for using the SDK in Xamarin Forms, as well as detailed instructions on how to add the SDK to your current MTD project.

  • Johan_SchoemanJohan_Schoeman ZAMember ✭✭

    ManateeWorks has indeed enabled my project to go forward!

  • nbevansnbevans USMember ✭✭✭

    I'm intrigued as to what the "public warning" is here?

  • Just for anybody else implementing the Dependency Service approach my app kept crashing when it called the .Scan method. After plenty of investigation I found out that I did not have Landscape Left / Landscape Right selected in my info.plist file under the "iPhone / iPod Deployment Info" section

  • NerudoMregiNerudoMregi USMember

    @Richard.Leonard said:
    Just for anybody else implementing the Dependency Service approach my app kept crashing when it called the .Scan method. After plenty of investigation I found out that I did not have Landscape Left / Landscape Right selected in my info.plist file under the "iPhone / iPod Deployment Info" section

    You saved my life!!!! Wish they documented this. @MenateeWorks

  • BjornBBjornB USMember ✭✭✭
    edited September 11
    1. Scandit does not support XF ( as per an email response from them)
    2. Manatee does not support XF either (also stated in an email response)

    but they support Xamarin.Android and ios, XF is just an abstraction on top of a platform... (= this is not a problem)
    https://xamarinhelp.com/xamarin-forms-dependency-injection/

    You dont deploy a pcl to your phone...

  • jaYCee.1750jaYCee.1750 USMember ✭✭

    Is there no other scanners developed from xamarin aside from Manatee, Scandit and ACR?

Sign In or Register to comment.