5 Replies Latest reply on Oct 24, 2018 9:31 AM by Darryn Campbell

    Did not get proper output from GS1 type barcode

    kels rathod

      Hi,

       

      I am referring barcodeSample sample code and updated below the line in setDecoders() methods for support GS1 type barcode.

       

      config.decoderParams.gs1Databar.enabled = true;

      config.decoderParams.gs1DatabarExp.enabled = true;

      config.decoderParams.gs1DatabarLim.enabled = true;

      scanner.setConfig(config);

       

      I have generated only GS1 type barcode (attached in attachment) and scanning GS1 type barcode ((01)19421123450011(15)991231(10)101234).  When I will scan, it will return only 01194211234500111599123110101234 (attached in attachment). Square brackets are removed automatically. 

        • Re: Did not get proper output from GS1 type barcode
          Darryn Campbell

          Hi, my understanding is that the brackets denote control codes, defined at https://www.gs1.org/sites/default/files/docs/barcodes/GS1_General_Specifications.pdf

           

          We have a feature called UDI which can help parse those codes and there is a tutorial for that here: UDI Label Scanning Programmer's Guide - Zebra Technologies Techdocs  and a sample here: UDI Label Scanning - Zebra Technologies Techdocs 

           

          I have not personally used the feature but I hope that helps.

            • Re: Did not get proper output from GS1 type barcode
              kels rathod

              Hi Darryn,

               

              Can we use datawedge for getting value based on control code?  I am datawedge using intent with below code. 

               

               

              private void displayScanResult(Intent initiatingIntent, String howDataReceived)

              {

                String decodedSource = initiatingIntent.getStringExtra(getResources().getString(R.string.datawedge_intent_key_source));

                String decodedData = initiatingIntent.getStringExtra(getResources().getString(R.string.datawedge_intent_key_data));

                String decodedLabelType = initiatingIntent.getStringExtra(getResources().getString(R.string.datawedge_intent_key_label_type));

               

                Log.d("howDataReceived","howDataReceived : " + howDataReceived);

                Log.d("key_source","key_source : " + initiatingIntent.getStringExtra(getResources().getString(R.string.datawedge_intent_key_source)));

                Log.d("key_data","key_data : " + initiatingIntent.getStringExtra(getResources().getString(R.string.datawedge_intent_key_data)));

                Log.d("label_type","label_type : " + initiatingIntent.getStringExtra(getResources().getString(R.string.datawedge_intent_key_label_type)));

                Log.d("source_legacy","source_legacy : " + initiatingIntent.getStringExtra(getResources().getString(R.string.datawedge_intent_key_source_legacy)));

                Log.d("data_legacy","data_legacy : " + initiatingIntent.getStringExtra(getResources().getString(R.string.datawedge_intent_key_data_legacy)));

                Log.d("type_legacy","type_legacy : " + initiatingIntent.getStringExtra(getResources().getString(R.string.datawedge_intent_key_label_type_legacy)));

               

                Log.d("tokenized_data","tokenized_data : " + initiatingIntent.getStringExtra("com.symbol.datawedge.tokenized_data"));

                Log.d("token_string_data","token_string_data : " + initiatingIntent.getStringExtra("token_string_data"));

                Log.d("token_binary_data","token_binary_data : " + initiatingIntent.getStringExtra("token_binary_data"));

               

                Log.d("serial_number","serial_number : " + initiatingIntent.getStringExtra("serial_number"));

                Log.d("lot_number","lot_number : " + initiatingIntent.getStringExtra("lot_number"));

                Log.d("expiration_date","expiration_date_original : " + initiatingIntent.getStringExtra("expiration_date_original"));

                Log.d("manufacturing_date","manufacturing_date_original : " + initiatingIntent.getStringExtra("manufacturing_date_original"));

                Log.d("labeler_identif_code","labeler_identification_code : " + initiatingIntent.getStringExtra("labeler_identification_code"));

                Log.d("Quantity","Quantity : " + initiatingIntent.getStringExtra("Quantity"));

                Log.d("unit_of_measure_id","unit_of_measure_id : " + initiatingIntent.getStringExtra("unit_of_measure_id"));

                Log.d("product_or_catalog","product_or_catalog_number : " + initiatingIntent.getStringExtra("product_or_catalog_number"));

              }

               

              I am scanning ((01)19421123450011(15)991231(10)101234). But I am not able to identify each control. Below is my log in an android studio.

               

              D/howDataReceived: howDataReceived : via Broadcast

              D/key_source: key_source : scanner

              D/key_data: key_data : 01194211234500111799123110101234 211234567890

              D/label_type: label_type : LABEL-TYPE-EAN128

              D/source_legacy: source_legacy : scanner

              D/data_legacy: data_legacy : 01194211234500111799123110101234 211234567890

              D/type_legacy: type_legacy : LABEL-TYPE-EAN128

              D/tokenized_data: tokenized_data : null

              D/token_string_data: token_string_data : null

              D/token_binary_data: token_binary_data : null

              D/serial_number: serial_number : null

              D/lot_number: lot_number : null

              D/expiration_date: expiration_date_original : null

              D/manufacturing_date: manufacturing_date_original : null

              D/labeler_identif_code: labeler_identification_code : null

              D/Quantity: Quantity : null

              D/unit_of_measure_id: unit_of_measure_id : null

              D/product_or_catalog: product_or_catalog_number : null

            • Re: Did not get proper output from GS1 type barcode
              Matt Dermody

              GS1 barcodes do not actually contain the "(" ")" characters around the AI values, those are just in the human readable portion of the barcode. Its not that the barcode scanner is removing the brackets/parens from the barcode data its that they were never there to begin with.