QRCode Generator implemented in pure Kotlin

Related tags

QRCode qrcode-kotlin
Overview

qrcode-kotlin

License Build Status Coverage Status Maven Central

🇧🇷 Disponível em Português (Brasil)

Creating QRCodes in Kotlin and Java is harder than it should be. QRCode-Kotlin aims to bring a simple, straightforward and customizable way to create QRCodes into the JVM domain, especially in the backend.

Advantages of QRCode-Kotlin

  • Pure Kotlin: Reimplemented on pure Kotlin from a reference implementation of the QRCode spec by Kazuhiko Arase
  • Lightweight: No dependencies, ~42KB and it does what it says on the tin.
  • Easy to use: Instantiate an object, invoke a method, and you're done :)
  • Compact: Doesn't add any bloat like when using libraries like Google's ZXing (which do way more than generate QRCodes)
  • Customizable output: Want to make a colorful QRCode? We got you!
  • Server friendly: This isn't a library for Mobile applications. This is a library thought by backend developers for backend developers.

Installation

This library is available from Maven Central so you can add QRCode-Kotlin to your project as a dependency like any other:

If you're using Maven - pom.xml:

<dependency>
    <groupId>io.github.g0dkargroupId>
    <artifactId>qrcode-kotlinartifactId>
    <version>1.1.0version>
dependency>

If you're using Gradle:

// Kotlin ❤️
implementation("io.github.g0dkar:qrcode-kotlin:1.1.0")

// Groovy
implementation 'io.github.g0dkar:qrcode-kotlin:1.1.0'

Examples and Usage

Here are a few examples of how to use the library to achieve some nice results. If you are interested in more advanced uses and/or fancier QRCodes, please read the documentation :)

Also, make sure to check our examples folder for codes in Kotlin and Java, and the resulting QRCodes!

Just a plain, simple QRCode, nothing fancy:

To generate a simple QRCode:

val imageData = QRCode("https://github.com/g0dkar/qrcode-kotlin").render()

// Save it as a PNG File:
ImageIO.write(imageData, "PNG", File("example01.png"))

Same code as above, but in Java:

BufferedImage imageData = new QRCode("https://github.com/g0dkar/qrcode-kotlin").render();

// Save it as a PNG File:
ImageIO.write(imageData, "PNG", new File("example01-java.png"));

A QRCode, but bigger

The render() function can receive a cellSize to adjust the size of the resulting QRCode. This parameter represents the size in pixels of each square of the resulting QRCode. Its default value is 25:

val imageData = QRCode("https://github.com/g0dkar/qrcode-kotlin").render(cellSize = 50)

ImageIO.write(imageData, "PNG", File("example02.png"))

In Java:

BufferedImage imageData = new QRCode("https://github.com/g0dkar/qrcode-kotlin").render(50);

ImageIO.write(imageData, "PNG", new File("example02-java.png"));

Just like Google's ZXing one!

As of the time of writing, Google's ZXing library is widely used to render QRCodes. Its rendering of QRCodes usually adds a "border" (aka "margin") around the QRCode, usually equal to 1 cell. The render() function can receive a margin parameter as well, which is how many pixels we want to have as a margin around our QRCode. By default, the margin parameter is equal to 0.

To have one of these nice looking and spaced QRCode, try doing this:

val cellSize = 30 // pixels
val imageData = QRCode("https://github.com/g0dkar/qrcode-kotlin")
    .render(cellSize, margin = cellSize)

ImageIO.write(imageData, "PNG", File("example03.png"))

In Java:

int cellSize = 30; // pixels
BufferedImage imageData = new QRCode("https://github.com/g0dkar/qrcode-kotlin")
    .render(cellSize, cellSize);

ImageIO.write(imageData, "PNG", new File("example03-java.png"));

A splash of Color

Want to have a colorful QRCode? Easy-peasy! The render() function also have the brightColor, darkColor and marginColor parameters just for that. Their default values are Black-and-White squares with a White margin. These are plain, (very) old java.awt.Color values in the RGBA space.

For fun, this will make a QRCode with GitHub's Dark Mode colors:

val background = Color(139, 148, 158)
val foreground = Color(13, 17, 23)

val imageData = QRCode("https://github.com/g0dkar/qrcode-kotlin").render(
    brightColor = background, // Background
    darkColor = foreground,   // Foreground (aka the "black squares")
    marginColor = background  // Margin (ignored since margin = 0)
)

ImageIO.write(imageData, "PNG", File("example04.png"))

In Java:

Color background = new Color(13, 17, 23);
Color foreground = new Color(139, 148, 158);

QRCode qrCode = new QRCode("https://github.com/g0dkar/qrcode-kotlin");
BufferedImage imageData = qrCode.render(25, 0, qrCode.encode(), background, foreground, background);

ImageIO.write(imageData, "PNG", new File("example04-java.png"));

Spring Framework and/or Spring Boot

One of the main reasons I developed this library was to use it on a Spring Boot API that needed to generate QRCodes. So it is only natural to show how to do that :)

{ val imageData = QRCode(content).render() val imageBytes = ByteArrayOutputStream().also { ImageIO.write(imageData, "PNG", it) }.toByteArray() val resource = ByteArrayResource(imageBytes, IMAGE_PNG_VALUE) return ResponseEntity.ok() .header(CONTENT_DISPOSITION, "attachment; filename=\"qrcode.png\"") .body(resource) } ">
import org.springframework.core.io.ByteArrayResource
import org.springframework.http.HttpHeaders.CONTENT_DISPOSITION
import org.springframework.http.MediaType.IMAGE_PNG_VALUE

@GetMapping("/qrcode")
fun generateQrCode(content: String): ResponseEntity<ByteArrayResource> {
    val imageData = QRCode(content).render()
    val imageBytes = ByteArrayOutputStream().also { ImageIO.write(imageData, "PNG", it) }.toByteArray()
    val resource = ByteArrayResource(imageBytes, IMAGE_PNG_VALUE)

    return ResponseEntity.ok()
        .header(CONTENT_DISPOSITION, "attachment; filename=\"qrcode.png\"")
        .body(resource)
}

License

Copyright 2021 Rafael M. Lins, Licensed under the MIT License.

QR Code is trademarked by Denso Wave, inc.

Support and Links

If you enjoyed the library and want to get me some coffee, use the button below 🤟

ko-fi


Documentação em Português (Brasil)

🇺🇸 Available in English

Criar QRCodes em Kotlin e Java é mais difícil do que deveria. O QRCode-Kotlin tenta trazer uma forma simples, direta e personalizável de se criar QRCodes para o domínio da JVM, especialmente no backend.

Vantagens do QRCode-Kotlin

  • Kotlin Puro: Reimplementação em puro Kotlin a partir da implementação de referência da especificação do QRCode por Kazuhiko Arase
  • Leve: Sem dependencias, ~42KB e faz exatamente o que promete fazer.
  • Fácil de usar: Instancie um objeto, chame um método e pronto :)
  • Compacta: Não adiciona nenhum "inchaço" como quando se usa bibliotecas como a Google ZXing (que fazem bem mais que gerar QRCodes)
  • Saída Personalizada: Quer um QRCode colorido? Nós temos!
  • Amigável aos Servidores: Esta não é uma biblioteca para aplicações Mobile. Esta biblioteca foi pensada por devs backend para devs backend.

Instalação

Esta biblioteca está disponível a partir da Central Maven, então basta adicionar o QRCode-Kotlin a seu projeto como qualquer outra dependência:

Se você utiliza Maven - pom.xml:

<dependency>
    <groupId>io.github.g0dkargroupId>
    <artifactId>qrcode-kotlinartifactId>
    <version>1.1.0version>
dependency>

Se você utiliza Gradle:

// Kotlin ❤️
implementation("io.github.g0dkar:qrcode-kotlin:1.1.0")

// Groovy
implementation 'io.github.g0dkar:qrcode-kotlin:1.1.0'

Exemplos e Usos

Aqui estão alguns exemplos de como utilizar a biblioteca para se ter alguns resultados bacanas. Se você tiver interesse em usos mais avançados ou QRCodes mais sofisticados, por favor leia a documentação :)

Apenas um QRCode simples, nada demais:

Para gerar um QRCode simples:

val dadosImagem = QRCode("https://github.com/g0dkar/qrcode-kotlin").render()

// Salvar como um arquivo PNG:
ImageIO.write(dadosImagem, "PNG", File("exemplo01.png"))

O mesmo que o código acima, em Java:

BufferedImage dadosImagem = new QRCode("https://github.com/g0dkar/qrcode-kotlin").render();

// Salvar como um arquivo PNG:
ImageIO.write(dadosImagem, "PNG", new File("exemplo01-java.png"));

Um QRCode, mas maior

A função render() pode receber o parâmetro cellSize para ajustar o tamanho do QRCode resultante. Este parâmetro representa o tamanho em pixels de cada quadrado no QRCode resultante. Seu valor padrão é 25:

val dadosImagem = QRCode("https://github.com/g0dkar/qrcode-kotlin").render(cellSize = 50)

ImageIO.write(dadosImagem, "PNG", File("exemplo02.png"))

Em Java:

BufferedImage dadosImagem = new QRCode("https://github.com/g0dkar/qrcode-kotlin").render(50);

ImageIO.write(dadosImagem, "PNG", new File("exemplo02-java.png"));

Igual ao Google ZXing!

No momento da escrita desta documentação, a biblioteca Google ZXing é amplamente utilizada para se gerar QRCodes. Seus resultados normalmente incluem uma "borda" (também chamada de "margem") ao redor do QRCode, geralmente com 1 célula de tamanho. A função render() também pode receber um parâmetro margin com a quantidade de pixels que queremos ter como margem ao redor do QRCode. Por padrão, o parâmetro margin é igual a 0 .

Para se ter um desses QRCodes bem espaçados, tente fazer o seguinte:

val tamanhoCelula = 30 // pixels
val dadosImagem = QRCode("https://github.com/g0dkar/qrcode-kotlin")
    .render(tamanhoCelula, margin = tamanhoCelula)

ImageIO.write(dadosImagem, "PNG", File("exemplo03.png"))

Em Java:

int tamanhoCelula = 30; // pixels
BufferedImage dadosImagem = new QRCode("https://github.com/g0dkar/qrcode-kotlin")
    .render(tamanhoCelula, tamanhoCelula);

ImageIO.write(dadosImagem, "PNG", new File("exemplo03-java.png"));

Um toque de Cor

Quer um QRCode colorido? Fácil, fácil! A Função render() também tem os parâmetros brightColor, darkColor e marginColor para isso. Seus valores padrão são para quadrados Preto-e-Branco com uma margem Branca. Esses são simples e (bem) velhos valores java.awt.Color no espaço RGBA.

Por diversão, este código cria um QRCode com as cores do Modo Escuro do GitHub:

val fundo = Color(13, 17, 23)
val principal = Color(139, 148, 158)

val dadosImagem = QRCode("https://github.com/g0dkar/qrcode-kotlin").render(
    brightColor = fundo,   // Fundo
    darkColor = principal, // Primeiro Plano (ou "os quadrados")
    marginColor = fundo    // Margem (ignorado pois margem = 0)
)

ImageIO.write(dadosImagem, "PNG", File("exemplo04.png"))

Em Java:

Color fundo = new Color(13, 17, 23);
Color principal = new Color(139, 148, 158);

QRCode qrCode = new QRCode("https://github.com/g0dkar/qrcode-kotlin");
BufferedImage dadosImagem = qrCode.render(25, 0, qrCode.encode(), fundo, principal, fundo);

ImageIO.write(dadosImagem, "PNG", new File("exemplo04-java.png"));

Spring Framework e/ou Spring Boot

Uma das razões principais que desenvolvi essa biblioteca foi para utilizá-la em uma API Spring Boot que necessitava gerar QRCodes, então é apenas natural mostrar como se fazer isso :)

{ val imageData = QRCode(content).render() val imageBytes = ByteArrayOutputStream().also { ImageIO.write(imageData, "PNG", it) }.toByteArray() val resource = ByteArrayResource(imageBytes, IMAGE_PNG_VALUE) return ResponseEntity.ok() .header(CONTENT_DISPOSITION, "attachment; filename=\"qrcode.png\"") .body(resource) } ">
import org.springframework.core.io.ByteArrayResource
import org.springframework.http.HttpHeaders.CONTENT_DISPOSITION
import org.springframework.http.MediaType.IMAGE_PNG_VALUE

@GetMapping("/qrcode")
fun generateQrCode(content: String): ResponseEntity<ByteArrayResource> {
    val imageData = QRCode(content).render()
    val imageBytes = ByteArrayOutputStream().also { ImageIO.write(imageData, "PNG", it) }.toByteArray()
    val resource = ByteArrayResource(imageBytes, IMAGE_PNG_VALUE)

    return ResponseEntity.ok()
        .header(CONTENT_DISPOSITION, "attachment; filename=\"qrcode.png\"")
        .body(resource)
}

Licença

Direito Autoral 2021 Rafael M. Lins, Licenciado pela Licença MIT (texto em inglês).

QR Code é marca registrada de Denso Wave, inc.

Suporte e Links

Se curtiu a biblioteca e quiser me pagar um café, utilize o botão abaixo 🤟

ko-fi

Comments
  • Duplicate class conflicts

    Duplicate class conflicts

    Describe the bug I import QRCode library and build in Android Studio Gradle detect a lot of duplicate classes on library com.android.tools.external.com-intellij:intellij-core:30.1.2 full-output: https://pastebin.mozilla.org/upNGVtqc

    After that I checking dependency tree using ./gradlew app:dependencies It seems that com.android.tools.external.com-intellij:intellij-core is imported by com.android.tools.lint:lint-gradle

    Am I use this library in the wrong way?

    To Reproduce Steps to reproduce the behavior. For example:

    1. import this library using implementation 'io.github.g0dkar:qrcode-kotlin-android:3.1.0'
    2. invoke gradle sync
    3. Make project
    4. error

    Expected behavior

    build sucessfully

    Screenshots or other QRCodes rendered with other tools

    Additional context

    my app:build.gradle

    plugins {
        id 'com.android.application'
        id 'org.jetbrains.kotlin.android'
        id 'org.jetbrains.kotlin.plugin.serialization'
        id 'kotlin-kapt'
        id 'dagger.hilt.android.plugin'
    }
    
    android {
        compileSdk 32
    
        defaultConfig {
            applicationId "at.mikuc.fcuassistant"
            minSdk 26
            targetSdk 32
            versionCode 1
            versionName "0.1.0"
    
            testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
            vectorDrawables {
                useSupportLibrary true
            }
        }
    
        buildTypes {
            release {
                minifyEnabled true
                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            }
            debug {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            }
        }
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
        kotlinOptions {
            jvmTarget = '1.8'
        }
        buildFeatures {
            compose true
        }
        composeOptions {
            kotlinCompilerExtensionVersion compose_version
        }
        packagingOptions {
            resources {
                excludes += '/META-INF/{AL2.0,LGPL2.1}'
            }
        }
    }
    
    dependencies {
    
        implementation 'androidx.core:core-ktx:1.8.0'
        implementation "androidx.compose.ui:ui:$compose_version"
        implementation "androidx.compose.material:material:$compose_version"
        implementation "androidx.compose.material:material-icons-extended:$compose_version"
        implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
        
        implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
        implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
        implementation 'androidx.activity:activity-compose:1.5.0'
    
        implementation "androidx.navigation:navigation-compose:$nav_version"
        api "androidx.navigation:navigation-fragment-ktx:$nav_version"
    
        implementation 'com.google.dagger:hilt-android:2.38.1'
        kapt 'com.google.dagger:hilt-compiler:2.38.1'
        implementation 'androidx.hilt:hilt-navigation-compose:1.0.0'
    
        implementation 'androidx.datastore:datastore-preferences:1.0.0'
    
        implementation 'org.burnoutcrew.composereorderable:reorderable:0.9.2'
    
        implementation 'io.github.g0dkar:qrcode-kotlin-android:3.1.0'
    
        implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.3")
        implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3")
        implementation("io.ktor:ktor-client-core:$ktor_version")
        implementation("io.ktor:ktor-client-cio:$ktor_version")
        implementation("io.ktor:ktor-client-content-negotiation:$ktor_version")
        implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor_version")
    
        testImplementation 'junit:junit:4.13.2'
        androidTestImplementation 'androidx.test.ext:junit:1.1.3'
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
        androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
        debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
        debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
    }
    
    bug 
    opened by mikucat0309 5
  • Unable to compile my Android app with java.awt

    Unable to compile my Android app with java.awt

    This issue is less important then #1, but I still reported to you.

    Describe the bug

    I got a very strange issue, I'm unable to compile my Android application with the lib. I got this compilation error :

    e: xxx/QrCode.kt: (55, 37): Cannot access class 'java.awt.image.BufferedImage'. Check your module classpath for missing or conflicting dependencies
    e: xxx/QrCode.kt: (55, 37): Cannot access class 'java.awt.Color'. Check your module classpath for missing or conflicting dependencies
    

    I looked in my "gradles" files and compared to yours and I didn't found anything.

    To Reproduce

    1. I added the lib on my project

    2. Write the flowing code :

    QRCode("20333 ").render()
    
    1. Compile the project

    Additional context

    I search on Google and I found that java.awt is not compatible with Android. To temporarily fix this I created a custom render.

    bug 
    opened by pvarry 5
  • Strange encoding with number

    Strange encoding with number

    Describe the bug When a create a QrCode with only number, it's encode content as byte array and some very common tools can't display content.

    To Reproduce

    QRCode("123456").render()
    QRCode("123456b").render()
    

    When I encode :

    • 123456 -> the content is undetectable as String, only tools supporting byte decoding can display content
    • 123456b -> the content detected by other tools is 4R6T8VY
    • 123456 gg -> work correcly

    PS: I used https://zxing.org/w/decode.jspx to decode QrCode

    Expected behavior

    To generate a QrCode with correct String encoded and be able to decode it with most tools.

    The solution can be to create a other constructor who can receive a Byte Array and use the current one only for String OR to add a parameter to specify input type.

    bug 
    opened by pvarry 3
  • Crash on QrCode with number only

    Crash on QrCode with number only

    Hello, first thanks for this library, it's nice to see light Kotlin code :+1:

    Describe the bug A got the flowing crash running this :

    QRCode("20333").encode()
    
        java.lang.StringIndexOutOfBoundsException: length=5; index=6
            at java.lang.String.substring(String.java:2060)
            at kotlin.text.StringsKt__StringsKt.substring(Strings.kt:393)
            at io.github.g0dkar.qrcode.internals.QRNumber.write(QRData.kt:137)
            at io.github.g0dkar.qrcode.QRCode.createData(QRCode.kt:353)
            at io.github.g0dkar.qrcode.QRCode.encode(QRCode.kt:250)
            at io.github.g0dkar.qrcode.QRCode.encode$default(QRCode.kt:231)
    

    To Reproduce Steps to reproduce the behavior. For example:

    Simply run the Kotlin code.

    Additional context I tested this on a physical device (Google Pixel XL) and on a emulator (Pixel 4 API 30), and on both I got this crash.

    If I run the folowing Kotlin code I didn't get the crash, but the QrCode is not what I want

    QRCode("20333 ").encode()
    
    bug 
    opened by pvarry 3
  • QRCode class docs are still the same as v1 😅

    QRCode class docs are still the same as v1 😅

    Describe the bug Yeah... as the title says. My bad :')

    To Reproduce Steps to reproduce the behavior. For example:

    1. Open the javadocs
    2. Read the javadocs
    3. ???
    4. Me dumb, sorry!

    Expected behavior

    An actual, working docs with cool examples! hahaha ^^

    Screenshots or other QRCodes rendered with other tools

    Additional context

    bug 
    opened by g0dkar 0
  • [GH-0005] Overhaul Render

    [GH-0005] Overhaul Render

    An improvement to make it easier to fix #2 - The part of the library that draws the QRCode is now sort of separate from everything else, and can have a simple Class Detection mechanism to decide which implementation to use :)

    It is extensible, so anyone can provide their own implementation of the QRCodeCanvas class for any platform!

    opened by g0dkar 0
  • Native target support for KMM project

    Native target support for KMM project

    Hi @g0dkar!

    Are you planning on adding native target support for this project to be able to use it in a KMM project (more specifically Android & iOS KMM project)?

    We've found that using the kotlin-only dependency (io.github.g0dkar:qrcode-kotlin:3.2.0) in our project results in the following error:

    No matching variant of io.github.g0dkar:qrcode-kotlin:3.2.0 was found. The consumer was configured to find a usage of 'kotlin-api' of a library, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native', attribute 'org.jetbrains.kotlin.native.target' with value 'ios_arm64' but:
              - Variant 'jvmApiElements-published' capability io.github.g0dkar:qrcode-kotlin:3.2.0 declares an API of a library:
                  - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
                  - Other compatible attributes:
                      - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
                      - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_arm64')
    

    Thank you in advance!

    opened by arturschwarz 3
  • Tag releases

    Tag releases

    Is your feature request related to a problem?

    Releases are not tagged, so there is no way to easily checkout to a specific release without having to go through logs, simultaneously there is no release history that one can look through.

    Describe the solution you'd like Tag releases and include change logs.

    opened by Doomsdayrs 0
  • RoundQRCode.kt Not working as expected

    RoundQRCode.kt Not working as expected

    Describe the bug I tried to create a rounded QR Code in my android application and the eyes of the QR Code still is in square. qrcode-kotlin-android:3.2.0

    To Reproduce Use the same code as in RoundQRCode.kt

    Expected behavior https://github.com/g0dkar/qrcode-kotlin/blob/main/examples/kotlin-round.png

    Screenshots or other QRCodes rendered with other tools Screenshot_20220905-100923_ADP Chat

    bug 
    opened by rishadappat 1
  • Cannot build the project - missing dependency on

    Cannot build the project - missing dependency on

    Describe the bug

    Build file '/Users/fedmest/Projects/qrcode-kotlin/build.gradle.kts' line: 15

    Plugin [id: 'com.android.library', artifact: 'com.android.tools.build:gradle:4.1.2'] was not found in any of the following sources:

    • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    To Reproduce

    1. I checked out the source code from github
    2. Opened the project in IntelliJ
    3. It fails when it configures the project

    I also tried building the project from the command line with gradle

    1. I checked out the source code from github
    2. CD'd into the project folder
    3. Ran gradle build
      • Gradle version 7.5
    bug 
    opened by fmestrone 7
  • Clean up & Update gradle config

    Clean up & Update gradle config

    A minor clean up to get things working properly, as sync seemed to have failed otherwise.

    Do ignore the name of the branch

    Please do note that the project fails to build the JVM target for some reason

    opened by Doomsdayrs 3
Releases(v3.3.0)
  • v3.3.0(Jan 2, 2023)

    JavaScript is here!

    After some time, and a lot of work and a number of personal, life stuff...

    • All standalone release files will be available here and on the /release folder on the project :)
    • JavaScript is here!
    • Native is on the way!
    • CHANGELOG.md is now created and I'll keep it up-to-day with notable changes between releases
    • I'll create these releases again
    • Tags should be up-to-date with past releases
    Source code(tar.gz)
    Source code(zip)
    qrcode-kotlin-jvm-3.3.0.jar(69.00 KB)
    qrcode-kotlin.d.ts(12.15 KB)
    qrcode-kotlin.js(313.01 KB)
    qrcode-kotlin.js.map(93.41 KB)
    qrcode-kotlin.min.js(126.66 KB)
    qrcode-kotlin.min.js.map(153.29 KB)
  • v3.0.0(Mar 21, 2022)

    Version 3.0.0!

    Highlights:

    • Now this is a Kotlin Multiplatform Library (thanks @Doomsdayrs)
    • Actual Android Support is finally here!
    • No other big changes are expected apart from these :)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.1(Feb 22, 2022)

  • v2.0.0(Feb 2, 2022)

    New Version!

    A complete overhaul of the whole Rendering part in order to make it more extensible and thus compatible with other drawing libraries other than Java AWT.

    That should fix #2 by allowing users to extend QRCodeCanvas and implement their own implementation of how to draw QRCodes. Please, either look at the new examples or BufferedImageCanvas to see how to build your own.

    As of the time of writing, I'm working on a qrcode-kotlin-android project which is just an Android Library that has this one as a dependency and implements a QRCodeCanvas using Android's Bitmap class :)

    Source code(tar.gz)
    Source code(zip)
  • v1.2.1(Nov 30, 2021)

    Fixed a number of issues with generating non-alpha numerical QRCodes (such as numbers-only) and added the option to manually specify the data type you want to encode into the QRCode :)

    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Nov 1, 2021)

    Worked out some issues with the Java Interoperability and got rid of the need of having to import the Kotlin Standard Library along with QRCode-Kotlin! Now you need only and only this library to have your QRCodes :)

    Source code(tar.gz)
    Source code(zip)
Owner
Rafael Lins
Software Engineer since 2007 - Working at @Glovo / Other profiles: @rafaellins-n26, @rafaellins-itau
Rafael Lins
a simple QRCode generation api for java built on top ZXING

QRGen: a simple QRCode generation api for java built on top ZXING Please consider sponsoring the work on QRGen Dependencies: ZXING: http://code.google

Ken Gullaksen 1.4k Dec 31, 2022
simple qrcode scan application

qrcode simple qrcode scan application

Geovani Amaral 6 Oct 5, 2022
ZATAC Scanner is Android Kotlin-based QR code scanner and parser which de-crypt TLV qr codes and parse them into their values.

ZATAC Scanner is Android Kotlin-based QR code scanner and parser which de-crypt TLV qr codes and parse them into their values.

Enozom 12 Apr 23, 2022
Mirai-device-generator - Mirai Device Generator with kotlin

Mirai Device Generator Mirai DeviceInfo 生成器 作为插件运行时会提供 BotConfigurationAlterer 服

cssxsh 46 Jan 1, 2023
An E-Commerce android App whose frontend is implemented using Kotlin & XML files and backend/database is implemented using My SQL & PHP files

An E-Commerce android App whose frontend is implemented using Kotlin & XML files and backend/database is implemented using My SQL & PHP files

null 4 Aug 25, 2022
QRCode 扫描二维码、扫描条形码、相册获取图片后识别、生成带 Logo 二维码、支持微博微信 QQ 二维码扫描样式

?? BGAQRCode-Android ?? 目录 功能介绍 常见问题 效果图与示例 apk Gradle 依赖 布局文件 自定义属性说明 接口说明 关于我 功能介绍 根据之前公司的产品需求,参考 barcodescanner 改的,希望能帮助到有生成二维码、扫描二维码、识别图片二维码等需求的猿友

王浩 7.7k Dec 29, 2022
a simple QRCode generation api for java built on top ZXING

QRGen: a simple QRCode generation api for java built on top ZXING Please consider sponsoring the work on QRGen Dependencies: ZXING: http://code.google

Ken Gullaksen 1.4k Dec 31, 2022
simple qrcode scan application

qrcode simple qrcode scan application

Geovani Amaral 6 Oct 5, 2022
A pure-Kotlin library for bots to interface with Revolt

RevoltKt A pure-Kotlin library for bots to interface with Revolt Sample Usage import me.maya.revolt.defaultClientBuilder import me.maya.revolt.events.

Maya 8 May 20, 2022
Lightweight service for creating standalone mock, written in pure Kotlin with Netty container.

MockService The lightweight service for creating a standalone mock, written in pure Kotlin with Netty container. The service allows getting config fil

null 2 Oct 28, 2021
sql-delight example, a plugin by Square which is pure kotlin and it is useful in kmm

Sql-Delight-Example01 Developed by Mahdi Razzaghi Ghaleh first example of sql-delight What is SqlDelight? Kotlin Multiplatform is one of the most inte

rq_mehdi 0 Jan 24, 2022
Android Word/Letter Tracing SDK is a complet solution to build apps for kids learning in pure kotlin

Android Word/Letter Tracing SDK is a complet solution to build apps for kids learning in pure kotlin. It supports all kind of shapes and all language letters e.g. english, arabic, Urdu, hindi etc.

null 9 Oct 16, 2022
A pure Kotlin/Multiplatform implementation of group operations on Curve25519.

curve25519-kotlin A pure Kotlin/Multiplatform implementation of group operations on Curve25519. Gradle Kotlin DSL: dependencies { implementation("

Andrey Pfau 9 Dec 22, 2022
:sound: [Android Library] Easily generate pure audio tone of any frequency in android

Android library to easily generate audio tone in android. Generating pure tone of an specific frequency was never that easy. ZenTone does all the heav

Nishant Srivastava 102 Dec 19, 2022
Pure Java code generation tool for generating a fully functional ContentProvider for Android.

RoboCoP RoboCoP is a Java library that can generate a fully-functional ContentProvider from a simple JSON schema file. Get the latest version from our

Rain 246 Dec 29, 2022
Nuwa, pure java implementation, can hotfix your android application.

Nuwa Nuwa is a goddess in ancient Chinese mythology best known for repairing the pillar of heaven. With this Nuwa project,you can also have the repair

Jason Ross 3k Dec 17, 2022
Template (pure) for KMM application with DI support

KMM di template Template (pure) for KMM application with DI support. Uses Multiplatform-DI for Dependency Injection Features Common architecture (VIP)

Anna Zharkova 8 Oct 18, 2022
Android & Pure Java library for sound manipulation

soundtransform Android & Pure Java library to shape a voice with an instrument. Table of Contents How to use the library FluentClient FluentClient sam

LiBe 42 Sep 12, 2021
Animated dark mode toggle button with Android & Pure Java. ☕

Dark-Toggle-Button Animated dark mode toggle button for Android Java. ☕ converted from kotlin to Java 201 lines: DarkToggleButton.java Android Demo In

knziha 2 Mar 13, 2022
🚀 React Native Segmented Control, Pure Javascript for iOS and Android

Installation Add the dependency: npm i react-native-segmented-control-2 Peer Dependencies Zero Dependency ?? Usage Import import SegmentedControl from

FreakyCoder 11 Nov 10, 2022