Come utilizzare il codice a barre di scansione stringa risultato?
-
26-10-2019 - |
Domanda
Io uso ZXing per la scansione di un codice a barre normale (non QR code) e ottengo una stringa scanresult
, o per essere più precisi il numero uno.
Quando I codici QR di scansione, è facile da utilizzare il risultato perché contiene sempre un URL al mercato Android. Ma come utilizzare il numero da un codice a barre regolare? Quale "motore di ricerca" da utilizzare per ottenere il prodotto giusto?
PS. quering questo numero risultato tramite google.com o Google Shopping restituito alcun prodotto a tutti
Soluzione
If it's an ordinary 1D barcode, it might turn up in the UPC database. Other than that, there's not a strictly universal barcode database. Amazon's ecommerce API might help (it supports UPC lookup, but I don't know if it supports non-current products), and if you're in the UK then Tesco's has one as well that's worth a look.
Altri suggerimenti
I've never used ZXing, but I see that it supports many barcode types. The type of the barcode will determine where you can look for it (i.e. it depends what you mean by a 'regular' barcode). If it's a UPC barcode, you can use something like this site.