1 Star 0 Fork 2

麦小格 / QrCodeZxingZbar

forked from angcyo / QrCodeZxingZbar 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

QrCodeZxingZbar

使用Zxing Zbar 结合 扫描, 默认1s切换一次ZxingZbar.

  • 具有Zxing所有特性
  • 具有Zbar所有特性
  • 支持生成二维码
  • 支持从图片扫码, 三层方法识别.
  • api 16+
  • zxing 3.3.3, 3.4需要api 24+

zxingzbar 的区别 总结一下:

  • zbar 快, 支持的格式少.
  • zxing 慢, 支持的格式多.

使用方法

启动扫码

ScanActivity.start(this)

获取扫码结果

ScanActivity.onResult(requestCode, resultCode, data)

创建二维码

RCode.syncEncodeQRCode("内容", 500)

扫描图片

RCode.scanPicture(bitmap)

定制界面

继承ScanFragment, 重写getLayoutId方法

class AppScanFragment : ScanFragment() {
    override fun getLayoutId(): Int {
        return R.layout.fragment_app_scan
    }
}

xml文件中,包含qr_code_scan_layout即可,其他元素可自行添加.

<include layout="@layout/qr_code_scan_layout" />

启动自定义界面

ScanActivity.start(this, AppScanFragment::class.java)

依赖


allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}
    
dependencies {
    implementation 'com.github.angcyo:QrCodeZxingZbar:1.0.2'
}

感谢

https://github.com/XieZhiFa/ZxingZbar

混淆

库中已经自带了混淆规则, 手动添加如下:

-keep class net.sourceforge.zbar.**{*;}
-keep class com.google.zxing.client.android.**{*;}

下载体验

扫码安装


群内有各(pian)种(ni)各(jin)样(qun)的大佬,等你来撩.

联系作者

点此QQ对话 该死的空格 点此快速加群

MIT License Copyright (c) 2020 angcyo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Android二维码/条码识别库, 使用Zxing/Zbar交替识别. 互补互助, 急速扫码. 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/maixiaoge/QrCodeZxingZbar.git
git@gitee.com:maixiaoge/QrCodeZxingZbar.git
maixiaoge
QrCodeZxingZbar
QrCodeZxingZbar
master

搜索帮助