Sjef Moling
Posts: 0
Joined: Thu Jan 23, 2014 10:00 am

problem with barcode scanner and camera

I've a problem with the barcode scanner and camera in one of my apps.

In the Appery tester app everything works fine, but when I build for Android it fails.

navigator.camera is undefined and for the barcode scanner I get and error in de console: "BarCodeService can't process request because BarcodeScanner is undefined."

I added the proper permission (CAMERA) for android and the plugins appear in the config.xml

Any suggestions on how to get this fixed?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

problem with barcode scanner and camera

Hi Sjef -

It is hard to say at this point what could be wrong here, before this Android builds were without such errors on devices?

Sjef Moling
Posts: 0
Joined: Thu Jan 23, 2014 10:00 am

problem with barcode scanner and camera

This is the first build with this functionality

Sjef Moling
Posts: 0
Joined: Thu Jan 23, 2014 10:00 am

problem with barcode scanner and camera

It seems "deviceReady" is not firing

At startup of the app I get the following logs via debugging:
code
deviceready has not fired after 5 seconds.
Channel not fired: onPluginsReady
Channel not fired: onCordovaReady
/code

Sjef Moling
Posts: 0
Joined: Thu Jan 23, 2014 10:00 am

problem with barcode scanner and camera

also remarkable from the console is that the loading of the js per page keep "pending"

eg

crazy88_details.html status 200
crazy88_details.js status pending
api service call status 200 (on page show or on load)

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

problem with barcode scanner and camera

Hello Sjef,

We tested this features and everything seems to work correctly. Could you please try to build a new simple app with camera and barcode service yourself for tests? And if you'll still have an error please specify what device with what OS you are using.

Sjef Moling
Posts: 0
Joined: Thu Jan 23, 2014 10:00 am

problem with barcode scanner and camera

Hi,
In another app a similar approach is working, so that's not the problem. I only can't figure out why in this app things don't work out.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

problem with barcode scanner and camera

Sjef,

Could you please clarify did you change anything on the Source tab?

Sjef Moling
Posts: 0
Joined: Thu Jan 23, 2014 10:00 am

problem with barcode scanner and camera

yes, I did bur reverted back to the original for Android. I can't undo changes... at least the option undo does not undo changes.

For iOS I had to change things as the file build by Appery is incorrect.

Return to “Issues”