dm77/barcodescanner hiện có 5.4k sao trên GitHub, viết chủ yếu bằng Java. Barcode Scanner Libraries for Android
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
This project is no longer maintained. When I first started this project in late 2013 there were very few libraries to help with barcode scanning on Android. But the situation today is much different. We have lots of great libraries based on ZXing and there is also barcode scanning API in Google's MLKit (https://github.com/googlesamples/mlkit). So given the options I have decided to stop working on this project.
Introduction
Android library projects that provides easy to use and extensible Barcode Scanner views based on ZXing and ZBar.
Screenshots
Minor BREAKING CHANGE in 1.8.4
Version 1.8.4 introduces a couple of new changes:
Open Camera and handle preview frames in a separate HandlerThread (#1, #99): Though this has worked fine in my testing on 3 devices, I would advise you to test on your own devices before blindly releasing apps with this version. If you run into any issues please file a bug report.
Do not automatically stopCamera after a result is found #115: This means that upon a successful scan only the cameraPreview is stopped but the camera is not released. So previously if your code was calling mScannerView.startCamera() in the handleResult() method, please replace that with a call to mScannerView.resumeCameraPreview(this);
ZXing
Installation
Add the following dependency to your build.gradle file.
public class SimpleScannerActivity extends Activity implements ZXingScannerView.ResultHandler {
private ZXingScannerView mScannerView;
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
mScannerView = new ZXingScannerView(this); // Programmatically initialize the scanner view
setContentView(mScannerView); // Set the scanner view as the content view
}
@Override
public void onResume() {
super.onResume();
mScannerView.setResultHandler(this); // Register ourselves as a handler for scan results.
mScannerView.startCamera(); // Start camera on resume
}
@Override
public void onPause() {
super.onPause();
mScannerView.stopCamera(); // Stop camera on pause
}
@Override
public void handleResult(Result rawResult) {
// Do something with the result here
Log.v(TAG, rawResult.getText()); // Prints scan results
Log.v(TAG, rawResult.getBarcodeFormat().toString()); // Prints the scan format (qrcode, pdf417 etc.)
// If you would like to resume scanning, call this method below:
mScannerView.resumeCameraPreview(this);
}
}
Please take a look at the zxing-sample project for a full working example.
Advanced Usage
Take a look at the FullScannerActivity.java or FullScannerFragment.java classes to get an idea on advanced usage.
Interesting methods on the ZXingScannerView include:
Specify front-facing or rear-facing cameras by using the void startCamera(int cameraId); method.
For HUAWEI mobile phone like P9, P10, when scanning using the default settings, it won't work due to the
"preview size", please adjust the parameter as below:
mScannerView = (ZXingScannerView) findViewById(R.id.zx_view);
// this paramter will make your HUAWEI phone works great!
mScannerView.setAspectTolerance(0.5f);
public class SimpleScannerActivity extends Activity implements ZBarScannerView.ResultHandler {
private ZBarScannerView mScannerView;
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
mScannerView = new ZBarScannerView(this); // Programmatically initialize the scanner view
setContentView(mScannerView); // Set the scanner view as the content view
}
@Override
public void onResume() {
super.onResume();
mScannerView.setResultHandler(this); // Register ourselves as a handler for scan results.
mScannerView.startCamera(); // Start camera on resume
}
@Override
public void onPause() {
super.onPause();
mScannerView.stopCamera(); // Stop camera on pause
}
@Override
public void handleResult(Result rawResult) {
// Do something with the result here
Log.v(TAG, rawResult.getContents()); // Prints scan results
Log.v(TAG, rawResult.getBarcodeFormat().getName()); // Prints the scan format (qrcode, pdf417 etc.)
// If you would like to resume scanning, call this method below:
mScannerView.resumeCameraPreview(this);
}
}
Please take a look at the zbar-sample project for a full working example.
Advanced Usage
Take a look at the FullScannerActivity.java or FullScannerFragment.java classes to get an idea on advanced usage.
Interesting methods on the ZBarScannerView include:
dm77/barcodescanner có 5.4k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/dm77/barcodescanner. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
dm77/barcodescanner có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho dm77/barcodescanner. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
dm77/barcodescanner còn đang phát triển không?
Commit gần nhất trên dm77/barcodescanner là 6.4 năm trước (theo timestamp GitHub). Repo có 1.4k fork — một chỉ báo về mức độ quan tâm của cộng đồng.
dm77/barcodescanner là gì?
dm77/barcodescanner (dm77/barcodescanner) là dự án Java trên GitHub. Theo mô tả gốc: Barcode Scanner Libraries for Android
dm77/barcodescanner viết bằng ngôn ngữ gì?
dm77/barcodescanner chủ yếu viết bằng Java. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
barcodescanner có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về barcodescanner.