Nick6231698
Posts: 0
Joined: Thu Sep 12, 2013 5:25 pm

I can't get the barcode scanner to work in a Salesforce App

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

I can't get the barcode scanner to work in a Salesforce App

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...

Nick6231698
Posts: 0
Joined: Thu Sep 12, 2013 5:25 pm

I can't get the barcode scanner to work in a Salesforce App

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

I can't get the barcode scanner to work in a Salesforce App

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).

Nick6231698
Posts: 0
Joined: Thu Sep 12, 2013 5:25 pm

I can't get the barcode scanner to work in a Salesforce App

Hmm... I still can't seem to get it to work. Do you think it has anything to do with using the Salesforce plugin?

Nick6231698
Posts: 0
Joined: Thu Sep 12, 2013 5:25 pm

I can't get the barcode scanner to work in a Salesforce App

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.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

I can't get the barcode scanner to work in a Salesforce App

The plug-in shouldn't matter. Did you try what Katya suggested above?

Nick6231698
Posts: 0
Joined: Thu Sep 12, 2013 5:25 pm

I can't get the barcode scanner to work in a Salesforce App

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...

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

I can't get the barcode scanner to work in a Salesforce App

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.

Nick6231698
Posts: 0
Joined: Thu Sep 12, 2013 5:25 pm

I can't get the barcode scanner to work in a Salesforce App

Well that's definitely a bummer... Do you think that will change over time?

Return to “Issues”