Developer here. I think you're going to want to just integrate via Intent in the end. You get the improvements, bug fixes, and platform-specific workarounds for free. It's much less code too. But I understand you're asking for an alternative.
You probably want to strip down Barcode Scanner (whose source is in android/ in the project) and strip out everything you don't need. That means leave only about the com.google.zxing.client.android
and com.google.zxing.client.android.camera
packages. The core decoding is in DecodeThread
, but the other code in these packages implements the little callback dance that does the continuous scanning and gets the usual scanning UI.
If you embed the code you need to follow the terms of the Apache License.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…