Closed sylvesterroos closed 1 year ago
I hope this help you !
` ErrorCorrectionLevel mErrorCorrectionLevel = ErrorCorrectionLevel.M;
Map<EncodeHintType, Object> hintsMap = new HashMap<>(); hintsMap.put(EncodeHintType.CHARACTER_SET, "utf-8"); if(isAztec or isPDF417){ hintsMap.put(EncodeHintType.ERROR_CORRECTION, mErrorCorrectionLevel.getBits()); } else { hintsMap.put(EncodeHintType.ERROR_CORRECTION, mErrorCorrectionLevel); } BitMatrix bitMatrix = new MultiFormatWriter().encode(mContent, barcodeFormat, mWidth, mHeight, hintsMap); `
Description of the problem:
When I generate a QR code I want it to have 15% error correction. How do I specify this? I've looked through the README but there is no explanation.
My current code:
How would I go about specifying the error correction level?
Which library version are you using? E.g. 3.2.0.
4.3.0 (
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
)