Fix issue that some HUAWEI scan error.

This commit is contained in:
Robin 2019-01-04 17:21:50 +08:00
parent af8fa170db
commit 82f461185d
1 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,8 @@ class BarcodeScannerActivity : Activity(), ZXingScannerView.ResultHandler {
title = ""
scannerView = ZXingScannerView(this)
scannerView.setAutoFocus(true)
// this paramter will make your HUAWEI phone works great!
scannerView.setAspectTolerance(0.5f)
setContentView(scannerView)
}