开发者

Android zxing: How to get product name when a UPC_A code is scanned

I currently implemented zxing in my app with @Sean Owen's IntentIntegrator (Thanks Sean!). I would like to use the UPC code retrieved to find out the actual product name. I know there is no easy way doing it, but can someone point me to the portion of the code in the zxing source that first showed the product name in the official barcode scanner app? (see attached image).

Around search around, google product is the best place to get product name. However, the result html is quite hard to parse -- since zxing has already figured it out and they are open source, I was wondering if there is an easier to get this done. Thanks.

Edit: What I ended up doing is to look for span开发者_如何学运维 key word "owb63p" to retrieve the product, I think zxing does something similar -- you can check out ProductResultInfoRetriever.java under package com.google.zxing.client.android.result.supplement.


Use this URL:

http://www.google.com/m/products?q={bar code}

For example,

http://www.google.com/m/products?q=9781934356173

This is written up in more detail here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜