Product information Retriever from Barcode

Put your problem here if it does not fit any of the other categories.

Product information Retriever from Barcode

Postby CatalystDroid » Fri Mar 04, 2011 1:40 am

Hello,

I am working on developing an inventory tracking application for android uing zxing barcode scanner integration. The problem I am currently having is providing the product information that zxing is able to display after a scan by querying google products. At least thats how I think that zxing gets the information. Any ideas on how I can implement this. I am able to scan the barcode and get the upc # but how can I then have it return product information from a query to a upc database or google product search?

Any help, insight, ideas would be greatly appreciated. Thanks.

Both parts of code below are part of AddItem.java that extends Activity and implements OnClickListener:


Code: Select all

public void onClick(View v) {
      
      switch (v.getId()) {
      
      case R.id.scanButton:
         Intent intent = new Intent("com.google.zxing.client.android.SCAN");
         intent.putExtra("SCAN_MODE", "PRODUCT_MODE");
         startActivityForResult(intent, REQUEST_BARCODE);
         break;
      
      case R.id.addButton:
          String barcode = mBarcodeEdit.getText().toString();
          String format = mFormatEdit.getText().toString();
          String title = mTitleEdit.getText().toString();
          String price = mPriceEdit.getText().toString();
         
          String errors = validateFields(barcode, format, title, price);
          if (errors.length() > 0) {
              showInfoDialog(this, "Please fix errors", errors);
          } else {
              mItemData.barcode = barcode;
              mItemData.format = format;
              mItemData.title = title;
              mItemData.price = new BigDecimal(price);

              mItemDb.insert(mItemData);
              showInfoDialog(this, "Success", "I saved successfully");
              resetForm();
          }
          break;

      
      }
      
   }


Code: Select all

public void onActivityResult(int requestCode, int resultCode, Intent intent) {
      

if (requestCode == REQUEST_BARCODE) {
   
   if (resultCode == RESULT_OK) {
      
      String barcode = intent.getStringExtra("SCAN_RESULT");
      
      mBarcodeEdit.setText(barcode);
      
      String format = intent.getStringExtra("SCAN_RESULT_FORMAT");
      
      mFormatEdit.setText(format);
      
   }
   
   else if (resultCode == RESULT_CANCELED) {
      
      finish();
      
      
      }

   }
}

User avatar
CatalystDroid
Junior Developer
Junior Developer
 
Posts: 15
Joined: Wed Jan 12, 2011 3:36 am

Top

Re: Product information Retriever from Barcode

Postby Thomassunshine » Sun Feb 17, 2013 8:18 am

Here is a sample code:
using BusinessRefinery.Barcodes.Reader;
// Read a Code 39 barcodes image in C# class
string[] barcodes = BarCodeReader.scanBarCode
(bmp,BusinessRefinery.Barcodes.Reader.BarCodeType.CODE39);
// Read Data Matrix barcodes in C# class
string[] barcodes = BarCodeReader.scanBarCode
(bmp,BusinessRefinery.Barcodes.Reader.BarCodeType.DATAMATRIX);

But i use barcode reader for .net , i do not know whether the code is available or not in your project.
Thomassunshine
Freshman
Freshman
 
Posts: 3
Joined: Fri Jan 18, 2013 9:01 am

Re: Product information Retriever from Barcode

Postby richguy » Thu Jul 04, 2013 8:48 am

After reading the question, I feel confused. I think it's not just about reading the barcode. Anyway, here I provide a clue. I also have experience of reading and generating barcode for years. I can only tell you a good barcode information source. You guys may find infor which is useful for you there. It's called onbarcode. You can read many useful barcode information there and many kinds of barcode generators and barcode readers, like QR Code barcode reader, C# barcode reader, .NET barcode reader, Code 39 barcode generator for .NET, Code 128 barcode generator for C#, etc.
richguy
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Jul 04, 2013 8:38 am

Re: Product information Retriever from Barcode

Postby nationmore » Thu Aug 22, 2013 3:45 am

richguy wrote:After reading the question, I feel confused. I think it's not just about reading the barcode. Anyway, here I provide a clue. I also have experience of reading and generating barcode for years. I can only tell you a good barcode information source. You guys may find infor which is useful for you there. It's called onbarcode. You can read many useful barcode information there and many kinds of barcode generators and barcode readers, like QR Code barcode reader, C# barcode reader, .NET barcode reader, Code 39 barcode generator for .NET, Code 128 barcode generator for C#, etc.

hello, richguy, i think you have grasp his meaning. he is looking for a generator to insert information and use the barcode scanner he has to read and scan. thank you for sharing your tool, i found it is interesting.
nationmore
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Aug 22, 2013 3:39 am

Re: Product information Retriever from Barcode

Postby cindy313 » Fri Sep 27, 2013 9:04 am

maybe sth.wrong with the setting of the reader tool, you may read the material about upc-a reader or upc-e reader for an answer to the question you met.
cindy313
Freshman
Freshman
 
Posts: 2
Joined: Tue Sep 17, 2013 3:20 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 20 guests