Page 1 of 1
Barcode Scan Google Search
Posted: Wed Dec 31, 2014 4:24 pm
by Anuj Puri
Hello, I'm somewhat new to using appery and creating mobile apps in general. I'm trying to create a barcode scanning function for my app where it scans a barcode, searches the barcode on google and then returns the result (the name of the item the barcode refers to) and displays the result. So for example, if the app scans the barcode on the back of a book, it would perform a background google search and then display the book's name/title on the screen. Or, if the app scans the barcode on a box of crackers, the cracker name shows. How do I go about doing this?
Barcode Scan Google Search
Posted: Thu Jan 01, 2015 12:51 am
by Yurii Orishchuk
Hi Anuj,
Here is a brief plan for it:
Get data from barcode scaner.
How to do it: http://devcenter.appery.io/tutorials/...
Create search service on needed 3rd party API.
Here is details about services: http://devcenter.appery.io/documentat...
Pass data from barcode scaner to search service. And link service result to the page to see results.
Here is tutorial to learn: http://devcenter.appery.io/tutorials/...
Regards.
Barcode Scan Google Search
Posted: Fri Jan 02, 2015 12:16 am
by Yurii Orishchuk
Hi Anuj,
It seems you don't pass query object.
Try this URL instead of yours:
precode
https://api.semantics3.com/v1/products?q={"cat_id":13658,"brand":"Toshiba","model":"Satellite"}
/code/pre
Regards.
Barcode Scan Google Search
Posted: Fri Jan 02, 2015 3:04 am
by Anuj Puri
Correct, I tried that and the api call worked(by placing that entire URL into the REST URL, however that doesn't allow me to change the value of cat_id or of brand.
How do i get this to work where I can then add cat_id and brand as request query strings, which I can then change based off other data that the I input into the app?
I thought the URL should only be ttps://api.semantics3.com/v1/products?q= and then set cat_id and brand as request query strings with empty values.
Barcode Scan Google Search
Posted: Fri Jan 02, 2015 3:42 am
by Yurii Orishchuk
Anuj,
You need to:
Use URL: "codehttps://api.semantics3.com/v1/products/code"
Open request tab and add query string parameter with name "q" and value code{"cat_id":13658,"brand":"Toshiba","model":"Satellite"}/code
Test it on "test" tab.
If it returns you correct response - you can use this "q" parameter to set dynamic value in datasource mapping.
Regards.
Barcode Scan Google Search
Posted: Sat Jan 03, 2015 9:44 pm
by Anuj Puri
Excellent. Thank you! That worked with their test URL, which doesn't require oauth. Now i'm trying to get it working with their production URL and I'm getting an oauth error. I've followed this: http://devcenter.appery.io/tutorials/...
in order to setup oauth. Now, the semantics directions tell me to install their .js file, using npm install semantics3-node. how do I do this? I tried importing their .js files and running a test javascript, but it fails. this is what i'm trying to follow now: https://github.com/Semantics3/semanti...
Barcode Scan Google Search
Posted: Mon Jan 05, 2015 1:01 am
by Yurii Orishchuk
Hi Anuj,
Unfortunatly that code wrote for node.js - not for browser.
So you can not use this code in Appery.io without editing this code.
Regards.
Barcode Scan Google Search
Posted: Thu Jan 08, 2015 3:04 am
by Anuj Puri
Alright. Thank you with your help!
Barcode Scan Google Search
Posted: Tue Dec 20, 2016 12:51 am
by Joe Beale
Did you ever get the Semantics3 api to work?
I'm having similar issues, except I can't even get the test server to work.
Here's my settings on the rest, am I missing something?
Barcode Scan Google Search
Posted: Mon Jul 20, 2020 4:11 pm
by Anuj Puri
\""FIELDNAME1\"":\""VALUE1\""