Source:
private void initializeAndStartBarcodeRecognition( JSONObject settings, Bundle options, Bundle overlayOptions) { getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); requestWindowFeature(Window.FEATURE_NO_TITLE); if (options.getBoolean("secure")) { getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE); } ScanSettings scanSettings; try { scanSettings = ScanSettings.createWithJson(settings); } catch (JSONParseException e) { Log.e("ScanditSDK", "Exception when creating settings"); e.printStackTrace(); scanSettings = ScanSettings.create(); } BarcodePickerWithSearchBar mPicker = new BarcodePickerWithSearchBar(this, scanSettings); mPicker.setOnScanListener(this); mPicker.setProcessFrameListener(this); mPicker.setLicenseValidationListener(this); mPicker.setTextRecognitionListener(this); mPicker.setPropertyChangeListener(this); this.setContentView(mPicker); mPickerStateMachine = new PickerStateMachine(mPicker, scanSettings, this); PhonegapParamParser.updatePicker(mPicker, options, this); if (sBufferedTorchEnabled.compareAndSet(true, false)) { mPicker.switchTorchOn(true); } UIParamParser.updatePickerUI(mPicker, overlayOptions); PhonegapParamParser.updatePicker(mPicker, overlayOptions, this); mContinuousMode = PhonegapParamParser.shouldRunInContinuousMode(options); mIsDidScanDefined = PhonegapParamParser.isDidScanDefined(options); mShouldPassBarcodeFrame = PhonegapParamParser.shouldPassBarcodeFrame(options); mStateBeforeSuspend = PhonegapParamParser.shouldStartInPausedState(options) ? PickerStateMachine.PAUSED : PickerStateMachine.ACTIVE; }

Target:
private void initializeAndStartBarcodeRecognition( JSONObject settings, Bundle options, Bundle overlayOptions) { getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); requestWindowFeature(Window.FEATURE_NO_TITLE); if (options.getBoolean("secure")) { getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE); } ScanSettings scanSettings; try { scanSettings = ScanSettings.createWithJson(settings); } catch (JSONParseException e) { Log.e("ScanditSDK", "Exception when creating settings"); e.printStackTrace(); scanSettings = ScanSettings.create(); } mPicker = new BarcodePickerWithSearchBar(this, scanSettings); mPicker.setOnScanListener(this); mPicker.setProcessFrameListener(this); mPicker.setLicenseValidationListener(this); mPicker.setTextRecognitionListener(this); mPicker.setPropertyChangeListener(this); this.setContentView(mPicker); mPickerStateMachine = new PickerStateMachine(mPicker, scanSettings, this); PhonegapParamParser.updatePicker(mPicker, options, this); if (sBufferedTorchEnabled.compareAndSet(true, false)) { mPicker.switchTorchOn(true); } UIParamParser.updatePickerUI(mPicker, overlayOptions); PhonegapParamParser.updatePicker(mPicker, overlayOptions, this); mContinuousMode = PhonegapParamParser.shouldRunInContinuousMode(options); mIsDidScanDefined = PhonegapParamParser.isDidScanDefined(options); mShouldPassBarcodeFrame = PhonegapParamParser.shouldPassBarcodeFrame(options); mStateBeforeSuspend = PhonegapParamParser.shouldStartInPausedState(options) ? PickerStateMachine.PAUSED : PickerStateMachine.ACTIVE; }