Awesome Open Source
Awesome Open Source

🏃BGAQRCode-Android🏃

barcodescanner barcodescanner PR

  • [x]
  • [x]
  • [x] TestScanActivity onClick
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]

  • [x] ZXing logo
  • [x] ZXing
  • [x] ZXing
  • [x] ZXing

  • [x] ZBar
  • [x] ZBar

1.

Toolbar View ZBarView ZXingView ZBarView ZXingView ZXing ZBar

2.

onDestroy mQRCodeView.onDestroy() onStop mQRCodeView.stopCamera()

apk

zbar109 zxingbarcode109 zxingdecode109 zxingqrcode109 iqegg

ZXingDemo.apk ZBarDemo.apk
ZXingDemo apk ZBarDemo apk

Gradle

  • maven { url 'https://jitpack.io' } root build.gradle repositories
  • app build.gradle latestVersion

ZXing

dependencies {
    implementation 'com.github.bingoogolapple.BGAQRCode-Android:zxing:latestVersion'
}

ZBar

dependencies {
    implementation 'com.github.bingoogolapple.BGAQRCode-Android:zbar:latestVersion'
}

ZXing

<cn.bingoogolapple.qrcode.zxing.ZXingView
    android:id="@+id/zxingview"
    style="@style/MatchMatch"
    app:qrcv_animTime="1000"
    app:qrcv_borderColor="@android:color/white"
    app:qrcv_borderSize="1dp"
    app:qrcv_cornerColor="@color/colorPrimaryDark"
    app:qrcv_cornerLength="20dp"
    app:qrcv_cornerSize="3dp"
    app:qrcv_maskColor="#33FFFFFF"
    app:qrcv_rectWidth="200dp"
    app:qrcv_scanLineColor="@color/colorPrimaryDark"
    app:qrcv_scanLineSize="1dp"
    app:qrcv_topOffset="90dp" />

ZBar

<cn.bingoogolapple.qrcode.zbar.ZBarView
    android:id="@+id/zbarview"
    style="@style/MatchMatch"
    app:qrcv_animTime="1000"
    app:qrcv_borderColor="@android:color/white"
    app:qrcv_borderSize="1dp"
    app:qrcv_cornerColor="@color/colorPrimaryDark"
    app:qrcv_cornerLength="20dp"
    app:qrcv_cornerSize="3dp"
    app:qrcv_isShowDefaultScanLineDrawable="true"
    app:qrcv_maskColor="#33FFFFFF"
    app:qrcv_rectWidth="200dp"
    app:qrcv_scanLineColor="@color/colorPrimaryDark"
    app:qrcv_topOffset="90dp" />

| | :----------- | :----------- | :----------- qrcv_topOffset | toolbar | 90dp qrcv_cornerSize | | 3dp qrcv_cornerLength | | 20dp qrcv_cornerColor | | @android:color/white qrcv_cornerDisplayType | () | center qrcv_rectWidth | | 200dp qrcv_barcodeRectHeight | | 140dp qrcv_maskColor | | #33FFFFFF qrcv_scanLineSize | | 1dp qrcv_scanLineColor | | @android:color/white qrcv_scanLineMargin | | 0dp qrcv_isShowDefaultScanLineDrawable | qrcv_scanLineSize qrcv_scanLineColor UI | false qrcv_customScanLineDrawable | qrcv_isShowDefaultScanLineDrawableqrcv_scanLineSizeqrcv_scanLineColor | null qrcv_borderSize | | 1dp qrcv_borderColor | | @android:color/white qrcv_animTime | | 1000 qrcv_isCenterVertical qrcv_verticalBias="0.5" | true qrcv_topOffset | false qrcv_verticalBias | qrcv_topOffset | -1 qrcv_toolbarHeight | Toolbar Toolbar | 0dp qrcv_isBarcode | | false qrcv_tipText | | null qrcv_tipTextSize | | 14sp qrcv_tipTextColor | | @android:color/white qrcv_isTipTextBelowRect | | false qrcv_tipTextMargin | | 20dp qrcv_isShowTipTextAsSingleLine | | false qrcv_isShowTipBackground | | false qrcv_tipBackgroundColor | | #22000000 qrcv_isScanLineReverse | | true qrcv_isShowDefaultGridScanLineDrawable | | false qrcv_customGridScanLineDrawable | | nulll qrcv_isOnlyDecodeScanBoxArea | | false qrcv_isShowLocationPoint | | false qrcv_isAutoZoom | | false

QRCodeView


/**
 * ZBarView  zbardemo  TestScanActivity  onClick 
 *
 * @param barcodeType 
 * @param formatList  barcodeType  BarcdeType.CUSTOM 
 */
public void setType(BarcodeType barcodeType, List<BarcodeFormat> formatList)

/**
 * ZXingView  zxingdemo TestScanActivity  onClick 
 *
 * @param barcodeType 
 * @param hintMap     barcodeType  BarcodeType.CUSTOM 
 */
public void setType(BarcodeType barcodeType, Map<DecodeHintType, Object> hintMap)

/**
 * 
 *
 * @param delegate 
 */
public void setDelegate(Delegate delegate)

/**
 * 
 */
public void showScanRect()

/**
 * 
 */
public void hiddenScanRect()

/**
 * 
 */
public void startCamera()

/**
 * 
 *
 * @param cameraFacing  Camera.CameraInfo.CAMERA_FACING_BACK or Camera.CameraInfo.CAMERA_FACING_FRONT
 */
public void startCamera(int cameraFacing)

/**
 * 
 */
public void stopCamera()

/**
 * 
 */
public void startSpot()

/**
 * 
 */
public void stopSpot()

/**
 * 
 */
public void stopSpotAndHiddenRect()

/**
 * 
 */
public void startSpotAndShowRect()

/**
 * 
 */
public void openFlashlight()

/**
 * 
 */
public void closeFlashlight()

/**
 *   null
 *
 * @param picturePath 
 */
public void decodeQRCode(String picturePath)

/**
 *  Bitmap   null
 *
 * @param bitmap 
 */
public void decodeQRCode(Bitmap bitmap)

QRCodeView.Delegate

/**
 * 
 *
 * @param result  result  null Bitmap  result  null
 */
void onScanQRCodeSuccess(String result)

/**
 * 
 *
 * @param isDark 
 */
void onCameraAmbientBrightnessChanged(boolean isDark);

/**
 * 
 */
void onScanQRCodeOpenCameraError()

QRCodeEncoder

/**
 * 
 *
 * @param content 
 * @param size    px
 */
public static Bitmap syncEncodeQRCode(String content, int size)

/**
 * 
 *
 * @param content         
 * @param size            px
 * @param foregroundColor 
 */
public static Bitmap syncEncodeQRCode(String content, int size, int foregroundColor)

/**
 * logo
 *
 * @param content         
 * @param size            px
 * @param foregroundColor 
 * @param logo            logo
 */
public static Bitmap syncEncodeQRCode(String content, int size, int foregroundColor, Bitmap logo)

/**
 * logo
 *
 * @param content         
 * @param size            px
 * @param foregroundColor 
 * @param backgroundColor 
 * @param logo            logo
 */
public static Bitmap syncEncodeQRCode(String content, int size, int foregroundColor, int backgroundColor, Bitmap logo)

/**
 * 
 *
 * @param content  
 * @param width    px
 * @param height   px
 * @param textSize px0
 */
public static Bitmap syncEncodeBarcode(String content, int width, int height, int textSize)

ZBarDemo🐾

ZXingDemo🐾

BGA QQ GitHub ( GitHub )
bingoogolapple.cn [email protected] BGA_CODE_CLUB GitHub

BGA 10.24 🐵👍

YFQ9Q3B Lantern🍻

License

Copyright (C) 2012 The Android Open Source Project
Copyright 2014 bingoogolapple

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Qrcode (5,814
Qrcode Generator (502
Qrcode Scanner (282