This is a migrated thread and some comments may be shown as answers.

Barcode Scanner - iOS Issues

16 Answers 154 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bill
Top achievements
Rank 1
Bill asked on 10 Jul 2013, 10:32 PM
I was wondering if anyone else was experiencing barcode capture issues on iOS devices using the barcode scanner plugin in Icenium.  

I've tested the barcode plugin on Android and iOS devices and it appears that Android devices are able to capture many barcodes that iOS can't.  The barcodes I am testing with are VIN barcodes off vehicles.

Any suggestions for improving capture rate on iOS devices with the plugin would be helpful.  Thanks.

Icenium Ion
Cordova: 2.7.0
Barcode Scanner Plugin: 0.3.0

16 Answers, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 10 Jul 2013, 10:50 PM
Hi Bill,

 The BarcodeScanner plugin relies on the zebra crossing (zing) library, which is more feature-complete on Android. The iOS port is written in C++ and supports only a number of the features that the original Java library supports.

Regards,
Yavor Georgiev
Telerik

Looking for tips & tricks directly from the Icenium team? Check out our blog!
Missed our first webinar, watch it here.
Share feedback and vote for features on our Feedback Portal.
0
Bill
Top achievements
Rank 1
answered on 11 Jul 2013, 02:23 PM
Thanks Yavor, that was helpful.  The Barcode Scanner for iOS can scan type UPC_A barcodes fine.  However the VIN barcodes will not work.  VIN barcodes appear to be type: Code_39.  Can you direct me to the iOS C++ dependency documentation so that I can see what barcode types are supported for iOS?

Would writing a custom plugin be an option here?  A custom barcode plugin that uses a different iOS barcode library?
0
Yavor Georgiev
Telerik team
answered on 11 Jul 2013, 02:40 PM
Hello Bill,

 I'm afraid I can't find any documentation on the C++ port of zxing. Perhaps you can try asking on their forum?

 As to your second question: yes, you can use any other plugin, as long as it can be made plugman-compatible. Unfortunately I don't know of a Cordova plugin that uses another scanning library.

Regards,
Yavor Georgiev
Telerik

Looking for tips & tricks directly from the Icenium team? Check out our blog!
Missed our first webinar, watch it here.
Share feedback and vote for features on our Feedback Portal.
0
Bill
Top achievements
Rank 1
answered on 15 Jul 2013, 01:56 PM
I posted in their forums about a week ago and I've had no response.  

I looked on their site and it appears the iOS port that icenium's plugin is using, only supports QR codes.

  • iphone: iPhone client + port to Objective C / C++ (QR code only)
I did find a port of ZXing for iOS which has a wider range of barcode support:

https://github.com/TheLevelUp/ZXingObjC

Do I have any additional options on this?  Scanning Code 39 barcodes is required for my application.
0
Steve
Telerik team
answered on 15 Jul 2013, 02:16 PM
Hello Bill,

The BarcodeScanner is a 3rd party plug-in, which we integrated into Icenium as it was highly requested and we did not have support for custom plug-ins at that time. With that said we have absolutely no control over that plug-in and how it develops (what library it uses). You can contact its author and suggest switching to that library for the iOS part of the plug-in or post to the plug-in Issues page about the limited barcode support.

Apart from that, you can wait for a plug-in based on the Obj C port of the library you've found to appear or be the one that creates it.

Regards,
Steve
Telerik

Looking for tips & tricks directly from the Icenium team? Check out our blog!
Missed our first webinar, watch it here.
Share feedback and vote for features on our Feedback Portal.
0
Bill
Top achievements
Rank 1
answered on 18 Jul 2013, 10:23 PM
Thanks Steve for the information.  I created and issue on the barcode plug-in's project and they said that Code 39 is supported...  they just hadn't updated the documentation yet.

Icenium's barcode scanner is 6 months out of date.  The current version is 0.6.0.  Perhaps the Code 39 support was added > 0.3.0.  When will Icenium update the barcode scanner plug-in so we can try out the latest version?
0
Steve
Telerik team
answered on 19 Jul 2013, 06:31 AM
Hi Bill,

We would no longer be updating the plug-ins that are currently built-in in Icenium, because since v.1.6 we have added support for custom Cordova plug-ins. This means that you could go grab the latest version of the BarcodeScanner plug-in and use it into your app. For more information on that, please follow the instructions from the referenced documentation.

Regards,
Steve
Telerik

Do you enjoy Icenium? Vote for it as your favorite new product here (use short code H048S).
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
0
Bill
Top achievements
Rank 1
answered on 19 Jul 2013, 01:23 PM
I have downloaded the latest Barcode plug-in and followed the custom-plugin documentation.

Barcode Plug-In: https://github.com/wildabeast/BarcodeScanner
Documentation: http://docs.icenium.com/creating-your-project/using-plugins/using-custom-plugins/using-custom-plugins

I have imported the BarcodeScanner into my Icenium project, I've added my script include, looked for comments/blocks for other cordova versions which are != to 2.7.0, but there are none.  When I try to build, I get import errors on the Java build.  See below.  Any thoughts?

[javac] Compiling 11 source files to /tmp/51dd038405d14a98aa68ffd0b02a9916/bin/classes
    [javac] /tmp/51dd038405d14a98aa68ffd0b02a9916/src/com/phonegap/plugins/barcodescanner/BarcodeScanner.java:19: cannot find symbol
    [javac] symbol  : class Plugin
    [javac] location: package org.apache.cordova.api
    [javac] import org.apache.cordova.api.Plugin;
    [javac]                              ^
    [javac] /tmp/51dd038405d14a98aa68ffd0b02a9916/src/com/phonegap/plugins/barcodescanner/BarcodeScanner.java:25: cannot find symbol
    [javac] symbol: class Plugin
    [javac] public class BarcodeScanner extends Plugin {
    [javac]                                     ^
    [javac] /tmp/51dd038405d14a98aa68ffd0b02a9916/src/com/phonegap/plugins/barcodescanner/BarcodeScanner.java:101: cannot find symbol
    [javac] symbol  : class Plugin
    [javac] location: class com.phonegap.plugins.barcodescanner.BarcodeScanner
    [javac]         this.cordova.startActivityForResult((Plugin) this, intentScan, REQUEST_CODE);
    [javac]                                              ^
    [javac] /tmp/51dd038405d14a98aa68ffd0b02a9916/src/com/phonegap/plugins/barcodescanner/BarcodeScanner.java:101: cannot find symbol
    [javac] symbol  : variable cordova
    [javac] location: class com.phonegap.plugins.barcodescanner.BarcodeScanner
    [javac]         this.cordova.startActivityForResult((Plugin) this, intentScan, REQUEST_CODE);
    [javac]             ^
    [javac] /tmp/51dd038405d14a98aa68ffd0b02a9916/src/com/phonegap/plugins/barcodescanner/BarcodeScanner.java:123: cannot find symbol
    [javac] symbol  : method success(org.apache.cordova.api.PluginResult,java.lang.String)
    [javac] location: class com.phonegap.plugins.barcodescanner.BarcodeScanner
    [javac]                 this.success(new PluginResult(PluginResult.Status.OK, obj), this.callback);
    [javac]                     ^
    [javac] /tmp/51dd038405d14a98aa68ffd0b02a9916/src/com/phonegap/plugins/barcodescanner/BarcodeScanner.java:133: cannot find symbol
    [javac] symbol  : method success(org.apache.cordova.api.PluginResult,java.lang.String)
    [javac] location: class com.phonegap.plugins.barcodescanner.BarcodeScanner
    [javac]                 this.success(new PluginResult(PluginResult.Status.OK, obj), this.callback);
    [javac]                     ^
    [javac] /tmp/51dd038405d14a98aa68ffd0b02a9916/src/com/phonegap/plugins/barcodescanner/BarcodeScanner.java:135: cannot find symbol
    [javac] symbol  : method error(org.apache.cordova.api.PluginResult,java.lang.String)
    [javac] location: class com.phonegap.plugins.barcodescanner.BarcodeScanner
    [javac]                 this.error(new PluginResult(PluginResult.Status.ERROR), this.callback);
    [javac]                     ^
    [javac] /tmp/51dd038405d14a98aa68ffd0b02a9916/src/com/phonegap/plugins/barcodescanner/BarcodeScanner.java:150: cannot find symbol
    [javac] symbol  : variable cordova
    [javac] location: class com.phonegap.plugins.barcodescanner.BarcodeScanner
    [javac]         this.cordova.getActivity().startActivity(intentEncode);
    [javac]             ^
    [javac] 8 errors
0
Steve
Telerik team
answered on 19 Jul 2013, 01:36 PM
Hi Bill,

It looks like the BarcodeScanner plugin hasn't been updated to match the Cordova 2.7 plugin API. More information about the migration process can be found in the following blog post: Why Don't My Plugins Work in PhoneGap Android 2.7?

Regards,
Steve
Telerik

Do you enjoy Icenium? Vote for it as your favorite new product here (use short code H048S).
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
0
Bill
Top achievements
Rank 1
answered on 19 Jul 2013, 03:39 PM
Thanks Steve!  Almost there!  Successful build and deploy now :)

Now the app isn't able to invoke the plugin from javascript.  I'm guessing my js include is wrong, however I followed the documentation.

plugin.xml asset:  <asset src="www/barcodescanner.js" target="barcodescanner.js" />

Documentation states that I should use the path of the target for my include in my index.html.  So this is what I did but it doesn't seem to work.

<script src="cordova.js"></script>
<script src="barcodescanner.js" type="text/javascript"></script>
0
Bill
Top achievements
Rank 1
answered on 19 Jul 2013, 03:59 PM
Steve, I figured it out.  It looks like the wildabeast barcodescanner.js is different than what icenium's is.  The icenium version registers the plugin totally different.  I ended up finding the differences between the two .js files and found a good way to register the plugin.

It looks like I'm good for now.  Thanks so much for all your help!
0
Dean
Top achievements
Rank 1
answered on 21 Feb 2014, 04:21 PM
Bill, we are also looking for a CODE39 IOS scanner. What did you end up using to get yours to work?
0
Bill
Top achievements
Rank 1
answered on 21 Feb 2014, 04:33 PM
The standard plugin included is actually:  https://github.com/wildabeast/BarcodeScanner

I created an issue found here: https://github.com/wildabeast/BarcodeScanner/issues/26

Another thread will detailed info:  https://github.com/wildabeast/BarcodeScanner/issues/34

Bottom line: The plugin does support code 39 on iOS, however most will not register well for various reasons.  We needed it for VIN vehicle barcode scanning and it will not work.  We have since disabled the scanning on iOS and only allow it on Android.  So we didn't find a solution.
0
paul
Top achievements
Rank 1
answered on 08 Oct 2014, 03:48 AM

<a href="http://www.onbarcode.com/products/iphone_barcode/" target="_blank">iphone Barcode Generator</a> Quick Start

Sample Objective-C code:


- (void)drawRect:(CGRect)rect {
// Drawing code

OBLinear *pLinear = [OBLinear new];
[pLinear setNBarcodeType: OB_CODE128A];
[pLinear setPDataMsg: [[NSString alloc] initWithString: (@"AB")]];
//[pLinear setPSupData: [[NSString alloc] initWithString: (@"14562")]];
[pLinear setFX: USER_DEF_BAR_WIDTH];
[pLinear setFY: USER_DEF_BAR_HEIGHT];

[pLinear setFLeftMargin: (USER_DEF_LEFT_MARGIN)];
[pLinear setFRightMargin: (USER_DEF_RIGHT_MARGIN)];
[pLinear setFTopMargin: (USER_DEF_TOP_MARGIN)];
[pLinear setFBottomMargin: (USER_DEF_BOTTOM_MARGIN)];

[pLinear setNRotate: (OB_Rotate0)];

UIFont *pTextFont = [UIFont fontWithName: @"Arial" size: 8.0f];
[pLinear setPTextFont: pTextFont];

[pLinear drawWithView: (self)];
[pLinear release];
0
Minh
Top achievements
Rank 1
answered on 11 Apr 2015, 12:24 PM
good
0
Shruthi
Top achievements
Rank 1
answered on 17 Feb 2017, 02:12 PM

Hi all,

I am facing a issue regarding the ios app, we have a quiz in the app that is a true or false so even when answer is incorrect the response its giving is the answer is correct but the same set of questions are rworking properly in the android app we recently updated our firebase.Can someone guide me through this?

Tags
General Discussion
Asked by
Bill
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
Bill
Top achievements
Rank 1
Steve
Telerik team
Dean
Top achievements
Rank 1
paul
Top achievements
Rank 1
Minh
Top achievements
Rank 1
Shruthi
Top achievements
Rank 1
Share this question
or