Closed YohannesTz closed 11 months ago
Read this
hi, sorry for the late reply. I tried what the docs recommended but I am still was not able to make it scannable in other apps.
Then try to remove highlighting. Its experimental and is not needed in your case
@YohannesTz remove this part and it will work
setAnchorsHighlighting(new QrHighlighting(
new HighlightingType.Styled(
QrHighlightingKt.QrVersionEyeShape(
new QrVectorFrameShape.AsPixelShape(new QrVectorPixelShape.Rect(.75f), 5),
QVectorShapeUtilsKt.asBallShape(new QrVectorPixelShape.Rect(.75f))),
new QrVectorColor.Solid(SurfaceColors.SURFACE_1.getColor(context)),
new QrVectorPixelShape.Rect(.0f),
new QrVectorColor.Solid(SurfaceColors.SURFACE_1.getColor(context))
),
new HighlightingType.Styled(
QrHighlightingKt.QrVersionEyeShape(
new QrVectorFrameShape.AsPixelShape(new QrVectorPixelShape.Rect(.75f), 5),
QVectorShapeUtilsKt.asBallShape(new QrVectorPixelShape.Rect(.75f))),
new QrVectorColor.Solid(ContextCompat.getColor(context, R.color.md_theme_light_primary)),
new QrVectorPixelShape.Rect(.0f),
new QrVectorColor.Solid(SurfaceColors.SURFACE_1.getColor(context))
),
new HighlightingType.Styled(
new QrVectorPixelShape.Rect(.75f), new QrVectorColor.Solid(SurfaceColors.SURFACE_1.getColor(context)),
new QrVectorPixelShape.Rect(.75f), new QrVectorColor.Solid(ContextCompat.getColor(context, R.color.md_theme_light_primary))),
1.0f
));
also do not use padding at all if not needed or decrease padding to 0.1f
qrVectorLogoBuilder.setPadding(new QrVectorLogoPadding.Natural(.1f));
Hi, I removed the part specified. was still unscannable. changing the color to black did the trick. didn't know contrast really affected the results. so what do you guys recommend me when it comes to branding?
Always test it and search for the most suitable working variant. QR codes aren't magic and not all styles are possible
I asked for Java sample and I got some code that works and generates the QR I want but the generated Qr is not scannable. I am not sure what I missed. I tried it on multiple devices.
here is my code
and in my fragment I have:
Result: