Closed yancyn closed 10 years ago
Add core-2.2.jar & android-integration-2.2.jar into library in compile & gradle (if has). Then apply the code below
IntentIntegrator integrator = new IntentIntegrator(yourActivity);
integrator.initiateScan();
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
if (scanResult != null) {
// handle scan result
}
// else continue with any other code you need in the method
...
}
see source
Add barcode scanning ability to allow user to scan barcode with front camera by integrating ZXing sdk into application.