Is there any QR code scanner plugin for android, iOS, windows RT and windows phone?

We require a plugin which should run on android, iOS, windows RT and windows phone device.
Any plugin or help is appreciated.

Best Answer

Answers

  • mainprashant89mainprashant89 INMember ✭✭

    Hi Aarav and Namyslaw Szymaniuk

    Thank you for the reply.

    I have tried the link that you shared but it is not working with the latest version of Xamarin.Forms.
    It is working on older version of Xamarin.Forms.

    Any other help much appreciated.

  • VulcanVulcan TWMember ✭✭✭

    I have created Xamarin.Forms app and use zxing for QR Code and Bar code , it work fine.

  • mainprashant89mainprashant89 INMember ✭✭

    hi Vulcan lee....thanks for the quick reply....Can you check whether it is working on the latest xamarin.forms versions as we are facing issue with Xamarin.forms(4.2.1.60) or share the link for reference

  • mainprashant89mainprashant89 INMember ✭✭

    Thanks a lot Vulcan...it worked. Can you suggest a way to make it work in windows phone and windows 8.1 system?

  • VulcanVulcan TWMember ✭✭✭

    @mainprashant89 said:
    Thanks a lot Vulcan...it worked. Can you suggest a way to make it work in windows phone and windows 8.1 system?

    I don't know much about Windows phone and Windows 8.1 system

  • Abbasym2009Abbasym2009 INMember ✭✭

    Hi Vulcan,

    When I tested the application in the ios device and tried to scan Qr code only white screen was displaying.

    Any idea ?

  • Hir47Hir47 USMember ✭✭

    Hii...
    but when to deny the permission for use camera then App was crash....!!!!
    Please help ...
    Thanks in Advance

  • arminrasoulian.9757arminrasoulian.9757 USMember ✭✭
    edited July 2017

    Hi @Hir47
    I have the same problem.
    Do you found any solution?

  • tafftaff USMember ✭✭

    @Hir47 said:
    Hii...
    but when to deny the permission for use camera then App was crash....!!!!
    Please help ...
    Thanks in Advance

    Yes, same is happening for me too. Is there any resolution to this?

  • seanydaseanyda GBMember ✭✭✭✭✭

    @taff said:

    @Hir47 said:
    Hii...
    but when to deny the permission for use camera then App was crash....!!!!
    Please help ...
    Thanks in Advance

    Yes, same is happening for me too. Is there any resolution to this?

    Get on this library it was updated a few weeks ago, and is a lot more stable then it used to be.

    https://github.com/Redth/ZXing.Net.Mobile

  • tafftaff USMember ✭✭

    Yep, just got it working myself.
    I was following THIS guide but it misses out the calls to init() on each platform.
    Follow these instructions and it should be good: https://github.com/Redth/ZXing.Net.Mobile

    Working well on Android from a Forms app for me thus far

  • tafftaff USMember ✭✭

    @taff said:
    Yep, just got it working myself.
    I was following THIS guide but it misses out the calls to init() on each platform.
    Follow these instructions and it should be good: https://github.com/Redth/ZXing.Net.Mobile

    Working well on Android from a Forms app for me thus far

    Scrap that.
    The first time I call into this, it pops up the permissions dialog, I click 'allow' and then my app crashes. After that it works well, but always crashes on first use after the permissions prompt. Anyone else found this?

  • seanydaseanyda GBMember ✭✭✭✭✭

    @taff said:

    @taff said:
    Yep, just got it working myself.
    I was following THIS guide but it misses out the calls to init() on each platform.
    Follow these instructions and it should be good: https://github.com/Redth/ZXing.Net.Mobile

    Working well on Android from a Forms app for me thus far

    Scrap that.
    The first time I call into this, it pops up the permissions dialog, I click 'allow' and then my app crashes. After that it works well, but always crashes on first use after the permissions prompt. Anyone else found this?

    Never had that problem myself. Might be worth putting an issue on the repository.

  • JassimRahmaJassimRahma USMember ✭✭✭✭

    @Vulcan it's not working for me.. I am able to get the camera running but it's not scanning the QR code and therefore I am not getting the result.. Why please?

    public void Scan()
    {
        try
        {
            scanner.Options = new MobileBarcodeScanningOptions()
            {
                UseFrontCameraIfAvailable = false, //update later to come from settings
                PossibleFormats = new List<BarcodeFormat>(),
                TryHarder = true,
                AutoRotate = false,
                TryInverted = true,
                DelayBetweenContinuousScans = 2000,
            };
    
    
            scanner.IsAnalyzing = true;
    
            scanner.VerticalOptions = LayoutOptions.FillAndExpand;
            scanner.HorizontalOptions = LayoutOptions.FillAndExpand;
    
            scanner.Options.PossibleFormats.Add(BarcodeFormat.QR_CODE);
    
            DisplayAlert("Scan Value", "Going to scan result", "OK");
    
            scanner.OnScanResult += (result) => {
                // Stop scanning
                // scanner.IsAnalyzing = false;
                // scanner.IsScanning = false;
    
                DisplayAlert("Scan Value", "scan result", "OK");
    
                if (scanner.IsScanning)
                {
                    scanner.AutoFocus();
                }
    
                // Pop the page and show the result
                Device.BeginInvokeOnMainThread(async () => {
                    if (result != null)
                    {
                        await DisplayAlert("Scan Value", result.Text, "OK");
                    }
                });
            };
    
            mainGrid.Children.Add(scanner, 0, 1);
        }
        catch (Exception ex)
        {
            DisplayAlert("Scan Value", ex.ToString(), "Error");
        }
    }
    
    
    
    
    <Grid x:Name="mainGrid" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
    <Grid.RowDefinitions>
        <RowDefinition Height="80" />
        <RowDefinition Height="300" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>
    
  • HarshitaHarshita INMember ✭✭✭

    Watch this video it will help you to create Barcode and QR code both with few line of code-

  • ThamaraiThamarai Member ✭✭

    Hi,
    How can I use ZXing in application created by native Xamarin.Android? I mean I am not using Xamarin.Forms to create my mobile application.
    If it is not, any other suggestions are also welcome.

  • sbirdsbird Member
    edited July 2018

    @JassimRahma said:
    @Vulcan it's not working for me.. I am able to get the camera running but it's not scanning the QR code and therefore I am not getting the result.. Why please?

    Download ZXing version 2.3.1 and not 2.4.1 .
    This issue was solved in v2.3.1 but appeared again in v2.4.1 .

    It works fine to me with v2.3.1 .

  • RHooglandRHoogland Member ✭✭

    Here is the problem:
    As usual, when opening a blank Mobile App (Xamarin.Forms), then running it on the phone emulator (Android), per default produces a white screen, showing the label: "Welcome to Xamarin.Forms!" So far no problem.

    Immediately after loading ZXing.Net.Xamarin.Forms, compatibility errors come up and the application won't run anymore.
    It happens with the latest pre-release as well as with the older versions of ZXing.
    So the ZXing is apparently not valid for running on Visual Studio 16.1.1

    Can anyone give me an alternative for scanning QR codes with the latest version of Visual Studio?

Sign In or Register to comment.