【问题标题】:How to call ExpandedProductResultParser in Android Zxing如何在 Android Zxing 中调用 ExpandedProductResultParser
【发布时间】:2012-01-30 16:34:18
【问题描述】:

我有一个条码扫描器应用程序,它建立在强大的 Zxing 库之上。我想知道是否可以通过在 android 活动中调用 ExpandedProductResultParser 等来使用 getLotNumber 方法。如果是,如何?

“在 Zxing 条码应用程序中获取相机错误” - 这是我基于 Zxing 构建的应用程序。

现在我想从条形码中提取批号。我在 onActivityResult() 中尝试过的是:

 String contents = intent.getStringExtra("SCAN_RESULT");
            //String format = intent.getStringExtra("SCAN_FORMATS");  

               Bundle bar=intent.getExtras();  

                System.out.println("Bundleeeeeeeeeeeeeeeeee :::::::::::" + bar );  

                String format = intent.getStringExtra("SCAN_RESULT_FORMAT");  
                System.out.println("Formaattttttttttttttt " + format);  





                Result result=new Result(contents, null, null, BarcodeFormat.CODE_128);  

                ResultParser.parseResult(result);  


            //ExpandedProductResultParser

在这里,我如何传递从 Result() 中的条形码捕获的实际格式?
另外我如何使用 ExpandedProductResultParser.parse() 获取lotNumber的方法?

谢谢
斯内哈

【问题讨论】:

    标签: android barcode-scanner product zxing


    【解决方案1】:

    你在使用 Intent 吗?是的,只需使用String 上的类即可返回解析它。有什么问题?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-27
      • 1970-01-01
      • 2013-09-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多