Android : Get data from a barcode?

2019-08-02 02:27发布

问题:

I am building an android application which should allow the user to scan the barcode of a food and display as much detail as possible - ie Food name, nutritional information etc.

So far I have implemented a barcode scanner using Zxing which will scan the barcode and display the barcode number.

My question is, is there a way I can use the scanned barcode to get information on the particular food product? I know the barcode is just a number, and that in supermarkets barcodes information are stored in a supermarket database.

Is there anyway I would have access to an online db of food products (open source) and then add the scanned food to my own firebase DB?

回答1:

There are a few groups who have tried to do something like this, including Open Grocery Database and UPC Food Search. The barcode value is known as a SKU in retail terms, so using that term might help you to find more information and resources on this. Good Luck!