Skip to content

Qr code is not rendered  #52

@MoaazElneshawy

Description

@MoaazElneshawy

I tried to use and it's generate the btimap , but when I scan the code no thing happens
here's my code

`
val logo = Logo()
logo.bitmap = BitmapFactory.decodeResource(context.resources, R.drawable.app_icon)
logo.borderRadius = 10 // radius for logo's corners
logo.borderWidth = 10 // width of the border to be added around the logo
logo.scale = 0.3f // scale for the logo in the QR code
logo.clippingRect = RectF(0f, 0f, 200f, 200f)

					val renderOption = RenderOption()
					renderOption.borderWidth = 20 // width of the empty space around the QR code
					renderOption.ecl = ErrorCorrectionLevel.M // (optional) specify an error correction level
					renderOption.patternScale = 0.35f
					renderOption.content = "www.google.com" // content to encode
					renderOption.size = 800 // size of the final QR code image
					renderOption.color = Color(
							auto = true,
							background = android.R.color.white,
							light = 0xFF0081D0.toInt(),
							dark = 0xFF0081D0.toInt(),
					) // set a color palette for the QR code
					renderOption.logo = logo

					try {
							val result = AwesomeQrRenderer.render(renderOption)
							if (result.bitmap != null) {
									// play with the bitmap
									findViewById<AppCompatImageView>(R.id.ivQrLogo)!!.setImageBitmap(result.bitmap)
							} else {
									// Oops, something gone wrong.
							}
					} catch (e: Exception) {
							e.printStackTrace()
					}

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions