Hello! Working on it. I'll update.
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
Hello! Working on it. I'll update.
Thank you for the very fast response! Looking forward to your updates!
On service Success you can add the code to navigate to link. You can open link in childBrowser or in default device browser. This should help https://getsatisfaction.com/apperyio/...
http://cordova.apache.org/docs/en/2.9...
if I follow:
Component: mobilebarcode1
Event: Success
Action: Navigate to Link
this results in having to input a static url. Rather, what I want to know is what code do I use to:
Acquire the url acquired from a QR code via the barcode scanner
Open that url in the default device browser.
In short, I want to scan a QR code and on success, automatically have the browser open that url.
On service success add Run JavaScript action with the following code:
prewindow.open(data.text, '_system', 'location=yes');/pre
Before that code you can also add code to check if data.text is a valid URL, if not - then do not navigate there.
Hi Marina,
I take it data.text is meant to grab whatever text is pulled form the QR Code, i.e. http://www.google.com. such that when window.open is used it results in,
window.open(http://www.google.com, '_system', 'location=yes');
which should cause a browser to open up and navigate me to google.com
however upon scan completion the browser isn't being opened :/ did I need some extra coding somewhere? Or binding the barcode component to something extra?
Hi,
You should wrap link in quotes:
codewindow.open("http://www.google.com", "_system", "location=yes");/code
Hi Katya,
Sorry, what I mean is that if the barcode scanner scans a QR code that has the text (or rather the url) http://www.google.com or http://appery.io, I want it to substitute into:
window.open('PLACE TEXT FROM QR CODE HERE", "_system", "location=yes")
I think the code Marina gave me should work,
window.open(data.text, '_system', 'location=yes');
but i'm thinking I'm missing some steps, such as data.text might not have any information from the barcode stored in it?
Hello! Did you add this code on on barcode scanner service success event?
prewindow.open(data.text, '_system', 'location=yes');/pre
You don't need to change anything, just add this code.