-
Notifications
You must be signed in to change notification settings - Fork 482
/
QRCodeAnalyzer.java
40 lines (31 loc) · 961 Bytes
/
QRCodeAnalyzer.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.king.zxing.analyze;
import com.google.zxing.DecodeHintType;
import com.google.zxing.Reader;
import com.google.zxing.qrcode.QRCodeReader;
import com.king.zxing.DecodeConfig;
import com.king.zxing.DecodeFormatManager;
import java.util.Map;
import androidx.annotation.Nullable;
/**
* 二维码分析器
*
* @author <a href="mailto:[email protected]">Jenly</a>
* <p>
* <a href="https://github.com/jenly1314">Follow me</a>
*/
@SuppressWarnings("unused")
public class QRCodeAnalyzer extends BarcodeFormatAnalyzer {
public QRCodeAnalyzer() {
this(new DecodeConfig().setHints(DecodeFormatManager.QR_CODE_HINTS));
}
public QRCodeAnalyzer(@Nullable Map<DecodeHintType, Object> hints) {
this(new DecodeConfig().setHints(hints));
}
public QRCodeAnalyzer(@Nullable DecodeConfig config) {
super(config);
}
@Override
public Reader createReader() {
return new QRCodeReader();
}
}