I hope you can help me with this. I use the built-in Zxing library to use a QR scanner, the problem is that it is in landscape mode, and I would like to change it to a portrait.
I have it on the dependencies of my Graddle
compile 'com.journeyapps:zxing-android-embedded:2.0.1@aar'
compile 'com.journeyapps:zxing-android-integration:2.0.1@aar'
compile 'com.google.zxing:core:3.0.1'
and I have this in my java class to activate the scanner with a button ...
public void scanQR(View view){
IntentIntegrator integrator = new IntentIntegrator(this);
integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES);
integrator.setResultDisplayDuration(0);
integrator.setPrompt(" Scan a QR Code");
integrator.setScanningRectangle(450, 450);
integrator.setCameraId(0);
integrator.initiateScan();
}
Thanks for the help!
source
share