以下方法位于GitHub上分享的示例代码google的BarcodeCaptureActivity.java
。
@Override
public void onBarcodeDetected(Barcode barcode) {
// I want to stop preview as well as freeze the screen
// when the first barcode is detected
// What do I add here?
}