发布v3.0.1
This commit is contained in:
@@ -39,7 +39,7 @@ repositories {
|
|||||||
|
|
||||||
```gradle
|
```gradle
|
||||||
// AndroidX 版本
|
// AndroidX 版本
|
||||||
implementation 'com.github.jenly1314:zxing-lite:3.0.0'
|
implementation 'com.github.jenly1314:zxing-lite:3.0.1'
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -201,6 +201,10 @@ dependencies {
|
|||||||
|
|
||||||
## 版本记录
|
## 版本记录
|
||||||
|
|
||||||
|
#### v3.0.1:2023-9-13
|
||||||
|
* 更新CameraScan至v1.0.1
|
||||||
|
* 更新ViewfinderView至v1.1.0
|
||||||
|
|
||||||
#### v3.0.0:2023-8-23
|
#### v3.0.0:2023-8-23
|
||||||
* 将通用基础类拆分移除并进行重构,后续维护更便捷
|
* 将通用基础类拆分移除并进行重构,后续维护更便捷
|
||||||
* 移除 **CameraScan** 相关核心类,改为依赖 [CameraScan](https://github.com/jenly1314/CameraScan)
|
* 移除 **CameraScan** 相关核心类,改为依赖 [CameraScan](https://github.com/jenly1314/CameraScan)
|
||||||
|
|||||||
Binary file not shown.
@@ -11,8 +11,8 @@
|
|||||||
"type": "SINGLE",
|
"type": "SINGLE",
|
||||||
"filters": [],
|
"filters": [],
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"versionCode": 38,
|
"versionCode": 39,
|
||||||
"versionName": "3.0.0",
|
"versionName": "3.0.1",
|
||||||
"outputFile": "app-release.apk"
|
"outputFile": "app-release.apk"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -73,13 +73,9 @@ class FullScreenQRCodeScanActivity : BarcodeCameraScanActivity() {
|
|||||||
* 显示结果点
|
* 显示结果点
|
||||||
*/
|
*/
|
||||||
private fun displayResultPoint(result: AnalyzeResult<Result>) {
|
private fun displayResultPoint(result: AnalyzeResult<Result>) {
|
||||||
val frameMetadata = result.frameMetadata
|
var width = result.bitmapWidth
|
||||||
var width = frameMetadata.width
|
var height = result.bitmapHeight
|
||||||
var height = frameMetadata.height
|
|
||||||
if (frameMetadata.rotation == 90 || frameMetadata.rotation == 270) {
|
|
||||||
width = frameMetadata.height
|
|
||||||
height = frameMetadata.width
|
|
||||||
}
|
|
||||||
val resultPoints = result.result.resultPoints
|
val resultPoints = result.result.resultPoints
|
||||||
val size = resultPoints.size
|
val size = resultPoints.size
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
## 版本记录
|
## 版本记录
|
||||||
|
|
||||||
|
#### v3.0.1:2023-9-13
|
||||||
|
* 更新CameraScan至v1.0.1
|
||||||
|
* 更新ViewfinderView至v1.1.0
|
||||||
|
|
||||||
#### v3.0.0:2023-8-23
|
#### v3.0.0:2023-8-23
|
||||||
* 将通用基础类拆分移除并进行重构,后续维护更便捷
|
* 将通用基础类拆分移除并进行重构,后续维护更便捷
|
||||||
* 移除 **CameraScan** 相关核心类,改为依赖[CameraScan](https://github.com/jenly1314/CameraScan)
|
* 移除 **CameraScan** 相关核心类,改为依赖[CameraScan](https://github.com/jenly1314/CameraScan)
|
||||||
|
|||||||
2
gitpack.yml
Normal file
2
gitpack.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
jdk:
|
||||||
|
- openjdk11
|
||||||
@@ -14,8 +14,8 @@ org.gradle.jvmargs = -Xmx1536m
|
|||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
|
|
||||||
VERSION_NAME=3.0.0
|
VERSION_NAME=3.0.1
|
||||||
VERSION_CODE=38
|
VERSION_CODE=39
|
||||||
GROUP=com.github.jenly1314
|
GROUP=com.github.jenly1314
|
||||||
|
|
||||||
POM_DESCRIPTION=ZXingLite for Android
|
POM_DESCRIPTION=ZXingLite for Android
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//App
|
//App
|
||||||
def app_version = [:]
|
def app_version = [:]
|
||||||
app_version.versionCode = 38
|
app_version.versionCode = 39
|
||||||
app_version.versionName = "3.0.0"
|
app_version.versionName = "3.0.1"
|
||||||
ext.app_version = app_version
|
ext.app_version = app_version
|
||||||
|
|
||||||
//build version
|
//build version
|
||||||
@@ -58,8 +58,8 @@ deps.test = test
|
|||||||
//zxing
|
//zxing
|
||||||
deps.zxing = "com.google.zxing:core:$versions.zxing"
|
deps.zxing = "com.google.zxing:core:$versions.zxing"
|
||||||
|
|
||||||
deps.camera_scan = "com.github.jenly1314:CameraScan:1.0.0"
|
deps.camera_scan = "com.github.jenly1314:camera-scan:1.0.1"
|
||||||
deps.viewfinderview = "com.github.jenly1314:viewfinderview:1.0.0"
|
deps.viewfinderview = "com.github.jenly1314:viewfinderview:1.1.0"
|
||||||
|
|
||||||
//desugar_jdk
|
//desugar_jdk
|
||||||
deps.desugar_jdk = "com.android.tools:desugar_jdk_libs:$versions.desugar_jdk_libs"
|
deps.desugar_jdk = "com.android.tools:desugar_jdk_libs:$versions.desugar_jdk_libs"
|
||||||
|
|||||||
@@ -15,15 +15,17 @@ import androidx.annotation.FloatRange;
|
|||||||
* 解码配置:主要用于在扫码识别时,提供一些配置,便于扩展。通过配置可决定内置分析器的能力,从而间接的控制并简化扫码识别的流程
|
* 解码配置:主要用于在扫码识别时,提供一些配置,便于扩展。通过配置可决定内置分析器的能力,从而间接的控制并简化扫码识别的流程
|
||||||
* <p></>
|
* <p></>
|
||||||
* 设置解码 {@link #setHints(Map)}内置的一些解码可参见如下:
|
* 设置解码 {@link #setHints(Map)}内置的一些解码可参见如下:
|
||||||
|
* <p>
|
||||||
|
* {@link DecodeFormatManager#DEFAULT_HINTS}
|
||||||
|
* {@link DecodeFormatManager#ALL_HINTS}
|
||||||
|
* {@link DecodeFormatManager#CODE_128_HINTS}
|
||||||
|
* {@link DecodeFormatManager#QR_CODE_HINTS}
|
||||||
|
* {@link DecodeFormatManager#ONE_DIMENSIONAL_HINTS}
|
||||||
|
* {@link DecodeFormatManager#TWO_DIMENSIONAL_HINTS}
|
||||||
|
* {@link DecodeFormatManager#DEFAULT_HINTS}
|
||||||
|
* <p>
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jenly1314@gmail.com">Jenly</a>
|
* @author <a href="mailto:jenly1314@gmail.com">Jenly</a>
|
||||||
* @see {@link DecodeFormatManager#DEFAULT_HINTS}
|
|
||||||
* @see {@link DecodeFormatManager#ALL_HINTS}
|
|
||||||
* @see {@link DecodeFormatManager#CODE_128_HINTS}
|
|
||||||
* @see {@link DecodeFormatManager#QR_CODE_HINTS}
|
|
||||||
* @see {@link DecodeFormatManager#ONE_DIMENSIONAL_HINTS}
|
|
||||||
* @see {@link DecodeFormatManager#TWO_DIMENSIONAL_HINTS}
|
|
||||||
* @see {@link DecodeFormatManager#DEFAULT_HINTS}
|
|
||||||
* <p>
|
* <p>
|
||||||
* 如果不满足您也可以通过{@link DecodeFormatManager#createDecodeHints(BarcodeFormat...)}自己配置支持的格式
|
* 如果不满足您也可以通过{@link DecodeFormatManager#createDecodeHints(BarcodeFormat...)}自己配置支持的格式
|
||||||
*
|
*
|
||||||
@@ -38,6 +40,7 @@ import androidx.annotation.FloatRange;
|
|||||||
* 即判定区域分析的优先级顺序为:{@link #setFullAreaScan(boolean)} -> {@link #setAnalyzeAreaRect(Rect)} -> {@link #setAreaRectRatio(float)}
|
* 即判定区域分析的优先级顺序为:{@link #setFullAreaScan(boolean)} -> {@link #setAnalyzeAreaRect(Rect)} -> {@link #setAreaRectRatio(float)}
|
||||||
* <p></>
|
* <p></>
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public class DecodeConfig {
|
public class DecodeConfig {
|
||||||
|
|
||||||
private Map<DecodeHintType, Object> hints = DecodeFormatManager.DEFAULT_HINTS;
|
private Map<DecodeHintType, Object> hints = DecodeFormatManager.DEFAULT_HINTS;
|
||||||
@@ -107,16 +110,16 @@ public class DecodeConfig {
|
|||||||
* 设置解码
|
* 设置解码
|
||||||
*
|
*
|
||||||
* @param hints {@link DecodeFormatManager}
|
* @param hints {@link DecodeFormatManager}
|
||||||
* <p>
|
|
||||||
* 内置的一些解码可参见如下:
|
|
||||||
* @return {@link DecodeConfig}
|
* @return {@link DecodeConfig}
|
||||||
* @see {@link DecodeFormatManager#DEFAULT_HINTS}
|
* <p>
|
||||||
* @see {@link DecodeFormatManager#ALL_HINTS}
|
* 内置的一些解码可参见如下:
|
||||||
* @see {@link DecodeFormatManager#CODE_128_HINTS}
|
* {@link DecodeFormatManager#DEFAULT_HINTS}
|
||||||
* @see {@link DecodeFormatManager#QR_CODE_HINTS}
|
* {@link DecodeFormatManager#ALL_HINTS}
|
||||||
* @see {@link DecodeFormatManager#ONE_DIMENSIONAL_HINTS}
|
* {@link DecodeFormatManager#CODE_128_HINTS}
|
||||||
* @see {@link DecodeFormatManager#TWO_DIMENSIONAL_HINTS}
|
* {@link DecodeFormatManager#QR_CODE_HINTS}
|
||||||
* @see {@link DecodeFormatManager#DEFAULT_HINTS}
|
* {@link DecodeFormatManager#ONE_DIMENSIONAL_HINTS}
|
||||||
|
* {@link DecodeFormatManager#TWO_DIMENSIONAL_HINTS}
|
||||||
|
* {@link DecodeFormatManager#DEFAULT_HINTS}
|
||||||
* <p>
|
* <p>
|
||||||
* 如果不满足您也可以通过{@link DecodeFormatManager#createDecodeHints(BarcodeFormat...)}自己配置支持的格式
|
* 如果不满足您也可以通过{@link DecodeFormatManager#createDecodeHints(BarcodeFormat...)}自己配置支持的格式
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import androidx.annotation.Nullable;
|
|||||||
*
|
*
|
||||||
* @author <a href="mailto:jenly1314@gmail.com">Jenly</a>
|
* @author <a href="mailto:jenly1314@gmail.com">Jenly</a>
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public abstract class BarcodeFormatAnalyzer extends AreaRectAnalyzer {
|
public abstract class BarcodeFormatAnalyzer extends AreaRectAnalyzer {
|
||||||
|
|
||||||
private Reader mReader;
|
private Reader mReader;
|
||||||
@@ -48,7 +49,7 @@ public abstract class BarcodeFormatAnalyzer extends AreaRectAnalyzer {
|
|||||||
rawResult = decodeInternal(source, isMultiDecode);
|
rawResult = decodeInternal(source, isMultiDecode);
|
||||||
|
|
||||||
if (rawResult == null && mDecodeConfig != null) {
|
if (rawResult == null && mDecodeConfig != null) {
|
||||||
if (rawResult == null && mDecodeConfig.isSupportVerticalCode()) {
|
if (mDecodeConfig.isSupportVerticalCode()) {
|
||||||
byte[] rotatedData = new byte[data.length];
|
byte[] rotatedData = new byte[data.length];
|
||||||
for (int y = 0; y < dataHeight; y++) {
|
for (int y = 0; y < dataHeight; y++) {
|
||||||
for (int x = 0; x < dataWidth; x++) {
|
for (int x = 0; x < dataWidth; x++) {
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public abstract class ImageAnalyzer implements Analyzer<Result> {
|
|||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
queue.add(nv21Data);
|
queue.add(nv21Data);
|
||||||
listener.onSuccess(null);
|
listener.onFailure(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import androidx.annotation.Nullable;
|
|||||||
*
|
*
|
||||||
* @author <a href="mailto:jenly1314@gmail.com">Jenly</a>
|
* @author <a href="mailto:jenly1314@gmail.com">Jenly</a>
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public class MultiFormatAnalyzer extends AreaRectAnalyzer {
|
public class MultiFormatAnalyzer extends AreaRectAnalyzer {
|
||||||
|
|
||||||
MultiFormatReader mReader;
|
MultiFormatReader mReader;
|
||||||
@@ -52,7 +53,7 @@ public class MultiFormatAnalyzer extends AreaRectAnalyzer {
|
|||||||
rawResult = decodeInternal(source, isMultiDecode);
|
rawResult = decodeInternal(source, isMultiDecode);
|
||||||
|
|
||||||
if (rawResult == null && mDecodeConfig != null) {
|
if (rawResult == null && mDecodeConfig != null) {
|
||||||
if (rawResult == null && mDecodeConfig.isSupportVerticalCode()) {
|
if (mDecodeConfig.isSupportVerticalCode()) {
|
||||||
byte[] rotatedData = new byte[data.length];
|
byte[] rotatedData = new byte[data.length];
|
||||||
for (int y = 0; y < dataHeight; y++) {
|
for (int y = 0; y < dataHeight; y++) {
|
||||||
for (int x = 0; x < dataWidth; x++) {
|
for (int x = 0; x < dataWidth; x++) {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import androidx.annotation.Nullable;
|
|||||||
*
|
*
|
||||||
* @author <a href="mailto:jenly1314@gmail.com">Jenly</a>
|
* @author <a href="mailto:jenly1314@gmail.com">Jenly</a>
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public class QRCodeAnalyzer extends BarcodeFormatAnalyzer {
|
public class QRCodeAnalyzer extends BarcodeFormatAnalyzer {
|
||||||
|
|
||||||
public QRCodeAnalyzer() {
|
public QRCodeAnalyzer() {
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ import java.util.Map;
|
|||||||
*
|
*
|
||||||
* @author Jenly <a href="mailto:jenly1314@gmail.com">Jenly</a>
|
* @author Jenly <a href="mailto:jenly1314@gmail.com">Jenly</a>
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public final class CodeUtils {
|
public final class CodeUtils {
|
||||||
|
|
||||||
public static final int DEFAULT_REQ_WIDTH = 480;
|
public static final int DEFAULT_REQ_WIDTH = 480;
|
||||||
|
|||||||
Reference in New Issue
Block a user