GithubHelp home page GithubHelp logo

Comments (23)

wjchristenson2 avatar wjchristenson2 commented on May 29, 2024

I can confirm Code 39 does not work on iOS. I opened an issue on this about 2 months ago. I originally thought Code 39 was not supported as the iOS documentation did not state that it was. wildabeast then showed me that Code 39 is supported via code and he updated the iOS documentation to reflect such. It did not work < 0.6.0 and it does not work 0.6.0.

from barcodescanner.

wildabeast avatar wildabeast commented on May 29, 2024

I just generated a basic Code 39 barcode here, and was able to scan it successfully with this plugin, so I don't think the problem is a lack of support for Code 39 -- I think its a problem with the camera and/or scanner library processing high density barcodes. For example, using the above website, a simple 7 digit Code 39 barcode scans successfully, while it seems to have trouble with 10+ digits.

@DURK I also don't believe the green overlay actually defines the boundaries of the scanning area -- I think it is simply a guide and the processing library would likely process the entire visible area (I've scanned barcodes while they extended outside of the border).

Note that this plugin is primarily a wrapper around a third party library. Its possible that updating the code from that project will improve things, but thats a shot in the dark.

from barcodescanner.

wildabeast avatar wildabeast commented on May 29, 2024

Also @DURK, if the old version did in fact work for you, any reason why you wouldn't just use that version? Any idea what version that was?

from barcodescanner.

wjchristenson2 avatar wjchristenson2 commented on May 29, 2024

Thanks wildabeast for your input. The 10+ characters makes sense and that's where my problem must be. I am trying to use the plugin to scan vehicle VIN number barcodes which are 17 alpha-numeric characters in length.

from barcodescanner.

wjchristenson2 avatar wjchristenson2 commented on May 29, 2024

@wildabeast, Are there any plans to support high density code_39 barcodes with 10+ characters on iOS (In my case, vehicle VIN barcodes - 17)? As mentioned before, it works on Android. I just upgraded our Cordova to 3.0 and the Barcode Scanner plugin to 0.7.0 and I tested again with no luck.

If not, any direction you can give to assist me with doing it myself would be much appreciated. Thanks!

from barcodescanner.

wenhsiaoyi avatar wenhsiaoyi commented on May 29, 2024

I also confirm Code 39 does not work on iOS.

from barcodescanner.

wildabeast avatar wildabeast commented on May 29, 2024

@wjchristenson2 as mentioned above, this plugin utilizes a third party library for all the heavy lifting around image / barcode processing. So any upgrades to those algorithms aren't in the roadmap.

As mentioned before, a shot in the dark will be to upgrade the scanning library used by the plugin to the latest code, in the hopes that improvements have been made.

from barcodescanner.

karljacuncha avatar karljacuncha commented on May 29, 2024

Might be relevant to this discussion:
I've tested this on an iPad (revision 3, with iOS 7), with a 5MP camera.

On this set up, Code 39 does work, but only at large sizes - at minimum of 6mm per character, 8mm or higher per character for more reliability.
So for your 10 char barcode you'd need it to be at least 6cm (2.4 inches) wide.

The same app running on a Samsung Android with 13MP camera could scan Code 39 at 2mm per character, 2.5 or higher for reliability. (So 2cm or 0.8in for the 10 chars).

The iPhones now have an 8MP camera. I didn't have one to use in my tests, but would guess the minimum sizes would be around 4/5 mm per char.

As @wildabeast says, the underlying scanning library determines what formats are supported, but seeing as Code39 is pretty simple and well established, I'd guess that it's supported across most devices.

Image stabilisation and decent auto-focus would help, but for small barcodes you basically just need a higher resolution camera. (...or make your barcodes bigger if possible).

These linear barcodes were designed for use with short wavelength light beams.
2D barcodes, like QR codes, were developed for optical recognition and avoid the banding/blurring issues you get with the narrow, high density lines.

from barcodescanner.

wjchristenson2 avatar wjchristenson2 commented on May 29, 2024

Unfortunately, we are working with vehicle VIN barcodes. We have no control over how the barcodes are printed. So for iOS, we are SOL at the moment.

from barcodescanner.

Ank13 avatar Ank13 commented on May 29, 2024

Has anyone figured out how to scan VIN barcodes on iOS, or can suggest a work around?

from barcodescanner.

tinnocente avatar tinnocente commented on May 29, 2024

Scanning VIN's with Droid isn't much better... I'd also like to know of any possible workaround? Thanks

from barcodescanner.

Eccenux avatar Eccenux commented on May 29, 2024

Code 39 actually works, but - as mentioned in #95 - the codes need to be short (less then 10 characters). I'm assuming the same problem is with VIN barcodes as they are very long. So it seems to be a problem of iOS version in that it only uses vertical view and so effectively scans less pixels.

from barcodescanner.

Ank13 avatar Ank13 commented on May 29, 2024

Agree. The issue seems to be that on the iOS version the scanner defaults to portrait/vertical mode and long CODE_39 bar codes, such as the 17-digit VIN, might work if the scanner was in landscape/horizontal mode.

Based on this StackOverflow (http://stackoverflow.com/questions/10945976/zxing-barcode-scanner-phonegap-plugin-ios-landscape-mode), it seems this could be fixed by deleting from zxing-all-in-one.cpp this section:
if (result.empty() && hints.getTryHarder() && image->isRotateSupported()) {}

I don't write cpp (hence using PhoneGap)... can anyone verify this would work and enter a pull request?

from barcodescanner.

BC17 avatar BC17 commented on May 29, 2024

@wjchristenson2, did you find a workaround to make +10 digits CODE_39 working?

from barcodescanner.

wjchristenson2 avatar wjchristenson2 commented on May 29, 2024

@BC17 I did not find a workaround. I've not had time to dig into the iOS code to see if I could hack it. I'd love it if someone resolved this though! Currently I'm hiding the VIN scan feature for iOS devices... that's my workaround for now until a fix comes out. /sigh

from barcodescanner.

BC17 avatar BC17 commented on May 29, 2024

did you try to force landscape mode with some plugin like screenOrientation ?

from barcodescanner.

rdwebdevel avatar rdwebdevel commented on May 29, 2024

Has there been any progress on this issue? It would appear that, according to DURK, this feature did work at one time.

from barcodescanner.

appnewbie avatar appnewbie commented on May 29, 2024

Still can't scan 17 character vehicle barcodes (CODE_39) and it doesn't matter if I use a 20Mpix Sony Android or iPhone 5S. Other apps I have tested works fine so what's the problem to get this scanner to work?

from barcodescanner.

fabiostrada1977 avatar fabiostrada1977 commented on May 29, 2024

I have the same problem. The plugin does not work on iOS 7. I have implemented a hybrid application for iOS and Android. Android application is OK. IOS application does not read the barcode. Has anyone solved the problem? is there a working example? I tested these two versions but neither works on iOS:

https://github.com/wildabeast/BarcodeScanner
https://github.com/Ornitorrinko/BarcodeScanner

from barcodescanner.

ascendedmasta avatar ascendedmasta commented on May 29, 2024

Seems to me, that the problem I'm having is that the camera just can't focus in close enough to read the smallest lines. Instead, sometimes it will output the wrong code tupe and the wrong number. But if I print the code out, and big enough, it reads Code_39 just fine... Anyway to tap the screen to focus the camera?

from barcodescanner.

mclhrn avatar mclhrn commented on May 29, 2024

I solved this by changing CDVBarcodeScanner.mm file slightly. I changed the value AVCaptureSessionPresetMedium to AVCaptureSessionPresetHigh. It is used in two places, so just do a find and replace. It now picks up every barcode with ease.

from barcodescanner.

rakeshrockb avatar rakeshrockb commented on May 29, 2024

@mclhrn Thanks sooo much.

from barcodescanner.

jacksonrdlc avatar jacksonrdlc commented on May 29, 2024

@mclhrn Perfect! Thanks dude!

from barcodescanner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.