ZXing Barcode Scanner Intent: set DecodeHintType.ASSUME_GS1

允我心安 提交于 2019-11-29 11:55:25

At the end it turned out that it was easier than I thought:

intentScan.putExtra("ASSUME_GS1", true);

The hints can be set with extras. I just had to figure it out, because I couldn't find it anywhere how to do that.

I downloaded the code of the Barcode Scanner and did a little debugging. But now I can use the original app and get the barcode via Intent. :-)

Yes, that's the hint you need. It will return FNC1 as ASCII 29. There's not a general way to pass the hints by Intent, but some are supported as additional Intent extras. If you want to submit a patch that triggers this hint I'll take a look.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!