Comments (23)
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.
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.
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.
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.
@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.
I also confirm Code 39 does not work on iOS.
from barcodescanner.
@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.
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.
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.
Has anyone figured out how to scan VIN barcodes on iOS, or can suggest a work around?
from barcodescanner.
Scanning VIN's with Droid isn't much better... I'd also like to know of any possible workaround? Thanks
from barcodescanner.
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.
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.
@wjchristenson2, did you find a workaround to make +10 digits CODE_39 working?
from barcodescanner.
@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.
did you try to force landscape mode with some plugin like screenOrientation ?
from barcodescanner.
Has there been any progress on this issue? It would appear that, according to DURK, this feature did work at one time.
from barcodescanner.
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.
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.
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.
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.
@mclhrn Thanks sooo much.
from barcodescanner.
@mclhrn Perfect! Thanks dude!
from barcodescanner.
Related Issues (20)
- Frame the camera view? HOT 1
- App crash HOT 1
- Interface is too ugly, can you change HOT 3
- QR code scanning is very slow on iOS
- PDF417 ios
- Scanning only first barcode part
- success-function returns nothing
- android,The image is distorted in the scan area HOT 1
- build fail
- .
- How to change UIColors
- CAMERA_USAGE_DESCRIPTION not added to Info.plist
- NSCameraUsageDescription... localized strings
- Trying to add a back button in android. HOT 1
- Disable flashlight at volume-buttons
- After the last update I get a "Access violation"-Error when starting the Scanner on W10/W10(m)
- Modifying cordova bar code scanner plugin interface in sap ui5 for andriod
- What is the minimum version of Android to use this plugin?
- German text encoding issue while scanning qr code HOT 1
- Archive repo and move ownership to the phonegap one HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from barcodescanner.