Getting Product information like name, price etc using barcode number Getting Product information like name, price etc using barcode number android android

Getting Product information like name, price etc using barcode number


Try adding on your API id to the url. https://developers.google.com/shopping-search/v1/getting_started#getting-started

I tried it and was able to get the information of Michael Kors MK5412 Chronograph Watches based of the url of your code.

https://www.googleapis.com/shopping/search/v1/public/products?country=US&q=691464717759&restrictBy=gtin=691464717759&key={your key here}

As a result, you have to fix your url builder to match ^.

Also make sure you put

<uses-permission android:name="android.permission.INTERNET"/>

in your manifest. Credit to this guy: http://androidforums.com/developer-101/100793-java-net-unknownhostexception.html.

Happy coding :)


You want to use the API and search by GTIN which is what the number encoded in the bar code represents.


There are also other barcode databases, like ean-search.org.