Hi
Is it possible to start the Barcode Scanner as the app loads.
I have tried including:
Invoke Service Datasource: mobilebarcode1
At startScreen "Load" and "Before Load" but the startScreen just loads.
Thanks
David
Hi
Is it possible to start the Barcode Scanner as the app loads.
I have tried including:
Invoke Service Datasource: mobilebarcode1
At startScreen "Load" and "Before Load" but the startScreen just loads.
Thanks
David
Hi David,
You can try Page Show event.
Make sure you call service on the start screen.
Run code on browser to see if there are errors in JS code (F12).
Please, note this can work on device only.
Hi Katya
When using:
startScreen Page show Invoke Service Datasource: mobilebarcode1
We get an error when testing in browser:
TypeError Cannot read property 'barcodeScanner' of undefined
All phone gap(cordova) plugins run on Device only. Not in the browser.
So things like childbrowser, contacts, barcode scanner etc.
I always test for phonegap b4 calling the function. Avoids errors when browser testing...
Hi Neil, I learnt that the hard way..
However in this case Katya asked me to run the code on the browser to see if there were any errors...
which resulted in
TypeError Cannot read property 'barcodeScanner' of undefined
I had first tried running in the phone but the barcode scanner doesn't open using any of these:
Load
Before Load
Page Show
Hello! You need to install app on device to get it working. It won't work in browser.
Hi Marina
As previously stated
I have tried running in the phone but the barcode scanner doesn't open using any of these:
Load
Before Load
Page Show
It will work if I call it from a button... but I want the scanner to open as soon as the app loads.
Could you please try one more event - Device ready?
That works a treat, fantastic, thank you.
Also you can use JS to call Scanner service.
I Use
codesetTimeout(function(){YOURSERVICENAME.execute({});},1500);//Start auto scanner service/code
This works on load,show,button, code, etc..