@Override
 public void barcodeResult(BarcodeResult result) {
   if (result != null && result.getBarcodeFormat().equals(BarcodeFormat.QR_CODE)) {
     barcodeScannerView.setStatusText(result.getText());
     etCodePinEntry.setText(result.getText());
     barcodeScannerView.pause();
     submit();
   }
 }
 /** Pauses the {@link AppCompatActivity} and pauses the barcode scanner and camera input */
 @Override
 protected void onPause() {
   super.onPause();
   barcodeScannerView.pause();
 }