KiteQR¶
Scan, decode, generate and render barcodes from commonMain on Kotlin
Multiplatform. The API is ZXing's, so code you
already wrote for Android reads the same here.
There is no platform barcode API underneath, no expect/actual, and no JNI.
The only dependency is kotlin-stdlib.
import io.github.yuroyami.kiteqr.Qr
import io.github.yuroyami.kiteqr.RGBLuminanceSource
import io.github.yuroyami.kiteqr.render.toPng
import io.github.yuroyami.kiteqr.render.toSvg
val matrix = Qr.encode("https://github.com/yuroyami/KiteQR")
val svg = matrix.toSvg()
val png = matrix.toPng(scale = 8)
val text: String? = Qr.decode(RGBLuminanceSource(w, h, pixels)).getText()
Modules¶
Both artifacts are on Maven Central. See Getting started.
| Artifact | What it gives you |
|---|---|
io.github.yuroyami:kiteqr |
The engine: scan, decode, encode, and SVG + PNG rendering. Pure common, kotlin-stdlib only. 22 targets. |
io.github.yuroyami:kiteqr-compose |
The Compose Multiplatform binding: DrawScope drawing, ImageBitmap, the QrCode composable. 7 targets, Android minSdk 24. |
Guides¶
- Getting started
- Generating codes
- Scanning and decoding
- Rendering
- Compose binding
- Supported platforms
- Differences from ZXing
License¶
Apache-2.0, derived from ZXing (Apache-2.0). See NOTICE for attribution.