Page 1 of 3
I can't get the barcode scanner to work in a Salesforce App
Posted: Thu Sep 12, 2013 5:25 pm
by Nick6231698
I am working on trying to make an app that can pull up the barcode scanner service to scan, then lookup a record.
I tried the barcode scanner tutorial and was able to the tutorial to work. When I try to follow the same methods in the app that is utilizing the salesforce plugin, it doesn't work. I can press the open scanner button but no scanner loads. I have tried testing the app both through the android app tester as well as by downloading the apk to the phone.
Any thoughts?
Nick
I can't get the barcode scanner to work in a Salesforce App
Posted: Thu Sep 12, 2013 8:09 pm
by Kateryna Grynko
Hi Nick,
By default, the tester can't test applications using device services. So you would need to build APK and test it on the device or emulator.
You can share app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a so we can take a look: http://docs.appery.io/documentation/s...
I can't get the barcode scanner to work in a Salesforce App
Posted: Fri Sep 13, 2013 2:42 pm
by Nick6231698
Hi Katya,
I also tried building the apk and tested it through there but still pressing the scan button does not load anything. I just shared the app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a as you suggested. Thanks so much for your response and for all of your help! 
Nick
I can't get the barcode scanner to work in a Salesforce App
Posted: Fri Sep 13, 2013 4:43 pm
by Kateryna Grynko
Hi Nick,
If I set startScreen with Scan button as a start screen then I'm able to run scanner. That is, the error appears before you navigate to page.
Please try testing the app on browser replacing invoking scanner with an usual alert message. Most likely you'll see the error in dev-tools (F12).
I can't get the barcode scanner to work in a Salesforce App
Posted: Sun Sep 22, 2013 10:33 pm
by Nick6231698
Hmm... I still can't seem to get it to work. Do you think it has anything to do with using the Salesforce plugin?
I can't get the barcode scanner to work in a Salesforce App
Posted: Sun Sep 22, 2013 10:37 pm
by Nick6231698
I tried it with a popup message as well as looked at errors and the error continues to be "undefined". It also shows that barcodeservice is undefined in properties.
I can't get the barcode scanner to work in a Salesforce App
Posted: Sun Sep 22, 2013 10:41 pm
by maxkatz
The plug-in shouldn't matter. Did you try what Katya suggested above?
I can't get the barcode scanner to work in a Salesforce App
Posted: Mon Sep 23, 2013 2:58 pm
by Nick6231698
I believe that I did. I did try and set my start page to the page with the barcodescanner rather than the SF Oauth page. This did result in it working. I also make sure to test it using the export as apk to android.
I just can't seem to figure out why it will work when changing the start page but won't work when the start page is set to the SF Oauth page. I believe that in order for me to be able to access the SF data that I need to have the Oauth page as the start page right?
I also just tried to export it to eclipse. I was able to get it to load the scanner with the start page changed but with the start page as SF Oauth I get these errors:
09-23 14:34:58.247: D/CordovaLog(279): https://appery.io/app/view/a2182a79-7...: Line 374 : TypeError Result of expression 'window.plugins' [undefined] is not an object.
09-23 14:34:58.247: I/Web Console(279): TypeError Result of expression 'window.plugins' [undefined] is not an object. at https://appery.io/app/view/a2182a79-7...
I can't get the barcode scanner to work in a Salesforce App
Posted: Tue Sep 24, 2013 1:55 am
by maxkatz
Sorry, what I said above is not entirely correct. The current plug-in only works when running a mobile web app. It won't work when running as hybrid app.
I can't get the barcode scanner to work in a Salesforce App
Posted: Wed Sep 25, 2013 2:44 pm
by Nick6231698
Well that's definitely a bummer... Do you think that will change over time?