Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Zxing scans a variety of barcodes/QR codes, so the first thing you need to do is figure out if its a product UPC or a QR code:</p> <pre><code> protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (data != null) { String response = data.getAction(); if(Pattern.matches("[0-9]{1,13}", response)) { // response is a UPC code, fetch product meta data // using Google Products API, Best Buy Remix, etc. } else { // QR code - phone #, url, location, email, etc. Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(response)); startActivity(intent); } } } </code></pre> <p>There are a number of web services available that will return product meta data given a UPC code. A fairly comprehensive one would be Google's <a href="http://code.google.com/apis/shopping/search/v1/getting_started.html" rel="nofollow">Search API for Shopping</a>. For example, you can get a json representations of the product with UPC = 037988482481 with an URL that looks like this: </p> <blockquote> <p><a href="https://www.googleapis.com/shopping/search/v1/public/products?country=US&amp;key=your_key_here&amp;restrictBy=gtin:037988482481" rel="nofollow">https://www.googleapis.com/shopping/search/v1/public/products?country=US&amp;key=your_key_here&amp;restrictBy=gtin:037988482481</a></p> </blockquote> <p>You'll need to replace "your_key_here" with your Google API key. </p> <p>Best Buy also offers a RESTful <a href="http://bbyopen.com/documentation/products-api" rel="nofollow">products API</a> for all of the products they carry which is searchable by UPC code. </p> <p>You'll want to use an AsyncTask to fetch the product metadata once you have the UPC. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload