MCPcopy Index your code
hub / github.com/ailiwean/NBZxing

github.com/ailiwean/NBZxing @0.2.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.2.5 ↗ · + Follow
2,412 symbols 6,082 edges 309 files 819 documented · 34% updated 4y ago0.2.5 · 2022-06-24★ 30913 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

推荐优先使用华为统一扫码(比微信都猛😲),这个库后期不会进行重大改动升级, 但是出问题我还是会及时处理的

NBZxing

一个稳定完善的扫码库,几行代码既可接入,完美适配各种分辨率无拉伸,可插拔式自定义UI 。

亮点 #

  • 基于google-cameraView调整优化,大量机型测试,可稳定流畅启动关闭相机
  • Camera2-Camera1分别实现扫码, 高版本默认走Camera2, 低版本Camera1, Camera2启动失败走Camera1
  • 灰度算法处理, 可应付一些特殊场景二维码并可拓展
  • 自定义探测器支持非白边等异形二维码识别
  • zxing源码修改,彻底解决复杂二维码扫出一堆不相干数字问题
  • 可能是目前最完善的扫码横竖屏切换,可配置不同布局,可动态切换

依赖

API

            implementation 'com.github.ailiwean:NBZxing:tag'
        //若需要使用灰度算法增强库,再次添加以下依赖(纯java超轻量,两个同时依赖,包体积只增大约400kb,混淆后仅200k)
        implementation 'com.github.ailiwean:NBZxing-Scale:tag'

NBZxing-Scale

说明

  • 仅AndroidX 不提供support,有需要自己改也没多少。
  • 库中已经包含zxing源码无需再次依赖

WIKI

如何使用-超简易

感谢@guangming提供近百台机型应用测试🙏

下载体验

在这里插入图片描述

  • 手动改文件后缀改为apk
😊 <自从写了这个库后,感觉身体与时间被掏空!!真的是花费了太多精力。如果觉得还凑合不错,强烈请求来上一个star ,开源不易,多多鼓励,感谢!> 😊

测试二维码

标准反色 82984899-9f981600-a025-11ea-9fe6-ad9fead67afa.png
彩色 caise.png
暗色 over_dart.png
曝光 over_light.png
浅色 test_gray.png
间断 test_inter.png
黑边 test2.png

联系我

QQ群: 444236054欢迎进群交流

😊 😊
请喝咖啡 pay.png

Extension points exported contracts — how you extend this code

Reader (Interface)
Implementations of this interface can decode an image of a barcode in some format into the String it encodes. For exampl [18 …
module_camera/src/main/java/com/ailiwean/core/zxing/core/Reader.java
Dispatch (Interface)
@Package: com.ailiwean.module_grayscale @ClassName: Dispatch @Description: @Author: SWY @CreateDate: 2020/8/9 6:31 PM [19 …
module_grayscale/src/main/java/com/ailiwean/module_grayscale/Dispatch.java
Writer (Interface)
The base class for all objects which encode/generate a barcode image. @author dswitkin@google.com (Daniel Switkin) [31 …
module_camera/src/main/java/com/ailiwean/core/zxing/core/Writer.java
MultipleBarcodeReader (Interface)
Implementation of this interface attempt to read several barcodes from one image. @see Reader @author Sean Owen [6 implementers]
module_camera/src/main/java/com/ailiwean/core/zxing/core/multi/MultipleBarcodeReader.java
CameraStarLater (Interface)
@Package: com.ailiwean.core.view @ClassName: CameraStarLater @Description: @Author: SWY @CreateDate: 2020/8/29 4:07 PM [4 …
module_camera/src/main/java/com/ailiwean/core/view/CameraStarLater.java
ScanLightViewCallBack (Interface)
@Package: com.ailiwean.core.view @ClassName: LightViewCallBack @Description: @Author: SWY @CreateDate: 2020/8/23 11:30 P [2 …
module_camera/src/main/java/com/ailiwean/core/view/ScanLightViewCallBack.java

Core symbols most depended-on inside this repo

get
called by 203
module_camera/src/main/java/com/ailiwean/core/zxing/core/common/BitArray.java
getNotFoundInstance
called by 140
module_camera/src/main/java/com/ailiwean/core/zxing/core/NotFoundException.java
add
called by 136
module_camera/src/main/java/com/ailiwean/core/zxing/core/oned/EANManufacturerOrgSupport.java
add
called by 111
module_camera/src/main/java/com/ailiwean/core/zxing/core/aztec/encoder/Token.java
getX
called by 109
module_camera/src/main/java/com/ailiwean/core/zxing/core/aztec/detector/Detector.java
getY
called by 109
module_camera/src/main/java/com/ailiwean/core/zxing/core/aztec/detector/Detector.java
getFormatInstance
called by 77
module_camera/src/main/java/com/ailiwean/core/zxing/core/FormatException.java
getSize
called by 72
module_camera/src/main/java/com/ailiwean/core/zxing/core/common/BitArray.java

Shape

Method 2,079
Class 300
Enum 17
Interface 15
Function 1

Languages

Java94%
Kotlin6%

Modules by API surface

module_camera/src/main/java/com/google/android/cameraview/CameraView.java55 symbols
module_camera/src/main/api21/com/google/android/cameraview/Camera2.java52 symbols
module_camera/src/main/api14/com/google/android/cameraview/Camera1.java37 symbols
module_camera/src/main/base/com/google/android/cameraview/CameraViewImpl.java28 symbols
module_camera/src/main/java/com/ailiwean/core/zxing/core/qrcode/detector/FinderPatternFinder2.java26 symbols
module_camera/src/main/java/com/ailiwean/core/zxing/core/common/BitMatrix.java26 symbols
module_camera/src/main/java/com/ailiwean/core/zxing/core/common/BitArray.java26 symbols
module_camera/src/main/java/com/google/android/cameraview/BaseCameraView.kt25 symbols
module_camera/src/main/java/com/ailiwean/core/zxing/core/pdf417/decoder/PDF417ScanningDecoder.java25 symbols
module_camera/src/main/java/com/ailiwean/core/zxing/core/qrcode/encoder/Encoder.java24 symbols
module_camera/src/main/java/com/ailiwean/core/zxing/core/aztec/detector/Detector.java24 symbols
module_camera/src/main/java/com/ailiwean/core/view/FreeZxingView.kt24 symbols

For agents

$ claude mcp add NBZxing \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page