Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Native Barcode Scanning Ios ,Andriod #7934

Closed
davidbuckleyni opened this issue Oct 10, 2019 · 32 comments
Closed

Native Barcode Scanning Ios ,Andriod #7934

davidbuckleyni opened this issue Oct 10, 2019 · 32 comments

Comments

@davidbuckleyni
Copy link

While there is the zxing libary it is no longer maintained and would be good if Xamrian had an internal method of barcode scanning.

You would need several view compenets such as

iOS: Xamarin.Forms.ScannerView (UIView) - See Xamarin.Forms.ScannerViewController.cs View Controller for an example of how to use this view
iOS: Xamarin.Forms.AVCaptureScannerView (UIView) - This is API equivalent to Xamarin.Forms.ScannerView, but uses Apple's AVCaptureSession Metadata engine to scan the barcodes instead of
Android: Xamarin.Forms.ZXingScannerFragment (Fragment) - See ZXingActivity.cs Activity

Thee should also be the ability to add custom overlays to the scanner areas on all devices.
IE Custom Buttons.
Barcode Formats that should be supported:
Aztec
Code 128
Code 39
Code 93
EAN13
EAN8
PDF417
QR
UPC-E

Features
Xamarin.iOS
Xamarin.Android (Including Google Glass)

@dansiegel
Copy link
Contributor

Is it that it’s no longer maintained or that it’s just stable? My thought is that it should generally be stable.
cc: @Redth

@RhomGit
Copy link

RhomGit commented Oct 11, 2019

Thread asking for a refresh release is here:
Redth/ZXing.Net.Mobile#780

@jfversluis
Copy link
Member

I think @Redth is busy with an overhaul of the barcode scanner plugin. The current one still has its use for sure, but also seems to have some quirks. Seeing that we might also be taking in the MediaElement for instance, it might be worth considering making this a first-party control as well.

@Redth
Copy link
Member

Redth commented Oct 12, 2019

I’m open to ideas. I started a major rewrite of it as it hasn’t aged so well and there’s a lot of things learned from the first implementation. I paused for now until camerax is stable from google and can be used to implement the camera bits on android. I’m open to ideas for turning it into a first party control.

@jfversluis
Copy link
Member

I was already thinking of drafting up a spec around this. But maybe if you already have something or want to incorporate your learnings maybe that is something you could do? Or, I'm happy to do it, but if you could provide me with some input? I'll ping you on Slack to have a little chat about it.

@acaliaro
Copy link

I think should be very interesting trying to add other features like text recognition...

@davidbuckleyni
Copy link
Author

davidbuckleyni commented Oct 16, 2019 via email

@lazmeister
Copy link

lazmeister commented Nov 1, 2019

Would love to see this happen! I would like to add another option to be able to switch between cameras. As almost every phone coming out in 2019+ there are at least 1+ cameras on the rear to choose from.

@davidbuckleyni
Copy link
Author

@lazmeister I agree zxing is a good library but needs maintained more if it was in as a standard in xarmain would make our lives easier. I had some issues such as double scanning that i managed to solve with delay scan property but would be good that it was fully documented etc.

@Robbert-jansen
Copy link

Yes please, the current version of ZXing has many issues, issues that make it almost impossible to use in my projects.

A first party alternative would be fantastic.

@davidbuckleyni
Copy link
Author

Haven’t look at this in ages glad to see it’s getting allot of traction end of day barcode scanning are native functions and used for 100% of business apps if xammy did this we love them for ever I am original poster of above

@SmartmanApps
Copy link

I agree with @Robbert-jansen - I've been using ZXing, but it randomly crashes on Android (seems to be OK on UWP). Had discussion with @jfversluis but we didn't find a resolution. I'm keenly looking forward to ZXing rewrite, or preferably a 1st party solution.

@MattVon
Copy link

MattVon commented Feb 12, 2020

Zxing is a nightmare at times, would totally love native support in Xamarin. @SmartmanApps, what sort of crashes have you experienced?

@SmartmanApps
Copy link

SmartmanApps commented Feb 12, 2020

Hey @MattVon thanks for asking. Usually after several scans the phone's camera would crash - not just my app, the camera app itself! The only way to get it working again was to reboot the phone. Obviously this can't go into a production app, which is why I'm so keen for a new/updated version. This happened on at least 2 different phones (but both running Marshmallow 6.0.1).

The first culprit was a message saying "X frames skipped. The UI thread is doing too much work",but long story short (e.g. playing around with scanning options), even though it sounds like an issue when under load (i.e. rapid scans), at least once it crashed on my very first scan, so not that, and there were other messages that could be the real culprit also, so the "X frames skipped" may or may not be a red herring. As I said, had some conversations with @jfversluis (since he did a stream about ZXing), but we never solved it, and then he told me @Redth was working on a new version, so I stuck it on the backburner and am awaiting that.

Donald.

P.S. even though this issue says "iOS,Android", I'd love to have it working on UWP also (ZXing works ok for me on UWP, just Android is the issue. I haven't tested iOS).

@samhouts samhouts added the F100 label Feb 13, 2020
@PaulVrugt
Copy link

It would be fantastic if this was created. We have been using Redth's ZXing implementation in our apps until now, since it is the only QR code implementation for XF that "sort of" works, but this code seems no longer to be maintained. We had to fork the project and make some changes to make it work at all, and some issues still exist.

@knocte
Copy link
Contributor

knocte commented Feb 15, 2020

We had to fork the project and make some changes to make it work at all,

My team has also needed to fork the project because of upstream inactivity. However, all the fixes we are using have been proposed as PRs. Can you propose your changes as well as PRs to upstream at least to make them visible please?

and some issues still exist.

Please also report issues that are not reported yet.

@PaulVrugt
Copy link

@knocte the fixes we did were actually already approved via pull request I made, but a version with the fixes was never released on Nuget. The issues we still run into are already existing open issues

@lazmeister
Copy link

@Redth Anyway to review those PRs for the time being? There are about 21 Open ones https://github.com/Redth/ZXing.Net.Mobile/pulls

@ahmedalejo
Copy link

This is something for https://github.com/xamarin/Essentials instead

@lazmeister
Copy link

@ahmedalejo Agreed. Either way Xamarin needs this ability.

@davidbuckleyni
Copy link
Author

That is not the same the project mentioned above is about taking photos not barcodes.

@davidbuckleyni
Copy link
Author

We have had a feature label added folks that means it’s a strong possibility that this will now happen.

@Phenek
Copy link

Phenek commented May 5, 2020

Hello @davidbuckleyni,

Has you can see CameraView is already in progress.
When it will be done, we will be able to consume the live preview stream a in our code.
This would enable us to stream the data to barcode detectors, face recognizers, etc.

Did you get it? It will be this first pillar of your Barcode recognition!

Even more you should be able at first to use native bar code scanning with a custom renderer.
And return your result to Xamarin.Forms!

Regards,

@davidbuckleyni
Copy link
Author

Hello @davidbuckleyni,

Has you can see CameraView is already in progress.

When it will be done, we will be able to consume the live preview stream a in our code.

This would enable us to stream the data to barcode detectors, face recognizers, etc.

Did you get it? It will be this first pillar of your Barcode recognition!

Even more you should be able at first to use native bar code scanning with a custom renderer.

And return your result to Xamarin.Forms!

Regards,

That is not the point of this to have a custom render the scan works differently in zxing and provides specialists components for accessing the scan two totally different things

@Phenek
Copy link

Phenek commented May 5, 2020

Yep, I understand you want the final product.
Be patient, it will come thereafter

@sarthak1995-26
Copy link

https://www.leadtools.com/sdk/xamarin/camera they achieved this somehow.But kind of costly right now

@davidbuckleyni
Copy link
Author

This is something for https://github.com/xamarin/Essentials instead

Not really we don't want Xamarin Essentials to get bloated, not every app requires scanning abilities and that is what Xamarin Essentials trys to keep to things that all apps require.

@Softtinn
Copy link

Any more info on this?

@davidbuckleyni
Copy link
Author

This is something for https://github.com/xamarin/Essentials instead

Not really its more for community toolkit. Essentials is a quick library's that doesnt provide things like this more helpers

@davidbuckleyni
Copy link
Author

It seems redth has made a new maui coMpatable reader folks.

@PaulVrugt
Copy link

@davidbuckleyni could you elaborate?

@jfversluis
Copy link
Member

There is some work going on here: https://github.com/Redth/BigIslandBarcoding

I don't want to get anyones hopes up, but we might have a good place for it and we're currently working out the details :)

Having that said, I will close this one because this will definitely not go into Forms anymore and I doubt it will be in .NET MAUI as a first-party control. We're working on it :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests