Page 1 of 2
problem with barcode scanner and camera
Posted: Sat May 23, 2015 5:44 pm
by Sjef Moling
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?
problem with barcode scanner and camera
Posted: Sun May 24, 2015 6:14 am
by Illya Stepanov
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?
problem with barcode scanner and camera
Posted: Sun May 24, 2015 1:33 pm
by Sjef Moling
This is the first build with this functionality
problem with barcode scanner and camera
Posted: Tue May 26, 2015 9:44 am
by Sjef Moling
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
problem with barcode scanner and camera
Posted: Tue May 26, 2015 9:46 am
by Sjef Moling
problem with barcode scanner and camera
Posted: Tue May 26, 2015 10:13 am
by Sjef Moling
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)
problem with barcode scanner and camera
Posted: Tue May 26, 2015 2:24 pm
by Evgene Karachevtsev
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.
problem with barcode scanner and camera
Posted: Tue May 26, 2015 3:27 pm
by Sjef Moling
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.
problem with barcode scanner and camera
Posted: Tue May 26, 2015 5:50 pm
by Evgene Karachevtsev
Sjef,
Could you please clarify did you change anything on the Source tab?
problem with barcode scanner and camera
Posted: Tue May 26, 2015 8:57 pm
by Sjef Moling
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.