Giter Site home page Giter Site logo

g0dkar / qrcode-kotlin Goto Github PK

View Code? Open in Web Editor NEW
144.0 5.0 11.0 3 MB

QRCode Generator implemented in pure Kotlin

Home Page: https://qrcodekotlin.com/

License: MIT License

Kotlin 34.50% Java 8.33% JavaScript 57.16%
kotlin java qrcode qrcode-generator qr-code jvm android

qrcode-kotlin's Introduction

Heya 👋

[EN] I'm Rafael and I'm a Software Engineer working mainly with Kotlin and Java on the Back-end!

[PT-BR] Eu sou Rafael e sou um Engenheiro de Software trabalhando principalmente com Kotlin e Java no Back-end! O resto deste profile encontra-se em Inglês.


My GitHub stats

My Top Languages

Featured Project

QRCode Kotlin

Professional Info

Formerly worked at Glovo, now dedicating myself to family and open source :)

  • 👀 LinkedIn
  • 🔭 I’ve been working with/in FinTechs for a while now
  • 🌱 I’m currently focusing on strengthening my knowledge of Software Architecture, mainly Microservice-related stuff
  • 💬 Ask me about Kotlin, Java and (almost) anything else :D
  • 😄 Pronouns: He/Him
  • ⚡ Fun fact: I like being part of the hiring process of the places I work at

Below you can find some stuff I've been doing :)

qrcode-kotlin's People

Contributors

g0dkar avatar rafaellins-swile avatar renovate[bot] avatar ruicanas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

qrcode-kotlin's Issues

can't find the documentation

Describe the bug
The link to the documentation page is broken
image

To Reproduce
Steps to reproduce the behavior. For example:

  1. Click the link in the README.md
  2. 404-page
  3. See error in screenshot

Expected behavior
I expected to find documentation. I can't really use the library without.

[iOS] Missing target for iOSX64 for 4.1.0

Describe the bug
It's not possible to download the library for projects containing the target iOSX64

To Reproduce
Try to update the library with the 4.1.0 version.

Logs 🪵

Caused by: org.gradle.internal.component.NoMatchingConfigurationSelectionException: No matching variant of io.github.g0dkar:qrcode-kotlin:4.1.0 was found. The consumer was configured to find a library for use during 'kotlin-metadata', 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_x64' but:

  • Variant 'iosArm64ApiElements-published' capability io.github.g0dkar:qrcode-kotlin:4.1.0 declares a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
    • Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_arm64' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_x64'
    • Other compatible attribute:
      • Doesn't say anything about its target Java environment (preferred optimized for non-jvm)

Additional context
This might be related with the last changes made on build.gradle.kts, given that the iOSX64 target was deleted and not added again to the list.

Thanks!

QRCode in fixed size?

I need for a mini IoT project that the qrcode must have a fixed resolution for example 320X320, is that possible ?

Qrcode Version

Hi :-)

I'm very interested in your library. But for the same string, the QRcode generated by your library is in version 10 (= 57 columns/lines) although the old library I've been currently using (AwesomeQRCode) generates a version 7 (= 45 columns/lines).

I wonder why this difference ? is it a question of EC level used ?
If yes, would it be possible to make this level configurable in your library ?

Thank you for your answer

How To Decode QR

Is there any chance with this library to decode the QR that has been generated with this library using a camera or import image?

[Android] Blank QR code squares with compose

Describe the bug
4.0.2-3

I'm updating a hobby project from v3.3.0 to 4.0.+ and it seems I am unable to render a QR code through Jetpack compose.

I am using landscapist as my image loading library and QR codes were working fine throughout v3, but now they are just blank solid colored squares moving to v4

I have tried using render(), render("bmp"), and renderToGraphics().nativeImage() to no avail. nativeImage() was my working way last major version.

render() seems to actually produce an inner square but, and rounded only shows rounded corners along the right side.

Correction: Top left corner is square while the other corners show a rounded corner

To Reproduce
Steps to reproduce the behavior. For example:

  1. Create a android sample project with compose
  2. Implement landscapist and qrcode-kotlin
  3. Create a sample screen with some test cases
  4. See error

Expected behavior
Rendered QR codes using Jetpack compose. Maybe a quick sample showing it off would help newcomers too!

Screenshots or other QRCodes rendered with other tools

qr1
qr2

Additional context

Quick sample code

                  LazyColumn(
                        modifier = Modifier.fillMaxSize(),
                        verticalArrangement = Arrangement.Top,
                        horizontalAlignment = Alignment.CenterHorizontally
                    ) {
                        item {
                            Text(text = "QR Examples!")
                            val qr1 = QRCode.ofSquares()
                                .withColor(Color.BLUE)
                                .withBackgroundColor(Color.RED)
                                .build("Hello QR 1!")
                            CoilImage(imageModel = { qr1.render() })
                            Spacer(modifier = Modifier.height(6.dp))
                        }

                        item {
                            val qr2 = QRCode.ofCircles()
                                .withColor(Color.BLUE)
                                .withBackgroundColor(Color.RED)
                                .build("Hello QR 2!")
                            CoilImage(imageModel = { qr2.render("bmp") })
                            Spacer(modifier = Modifier.height(6.dp))
                        }

                        item {
                            val qr3 = QRCode.ofCircles()
                                .withColor(Color.BLUE)
                                .withBackgroundColor(Color.RED)
                                .build("Hello QR 3!")
                            CoilImage(imageModel = { qr3.renderToGraphics().nativeImage() })
                            Spacer(modifier = Modifier.height(6.dp))
                        }
                    }

[v4.0.1] iOS and tvOS Feedback

Hello everyone!

Feel free to leave any and all feedback of the iOS and tvOS support now available at v4.0.1

Thank you all so much for using, and hopefully enjoying, this project ^^

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"
}

Android minimum version requirement

I tried to update my project's gradle file to use qrcode-kotlin 4.0.3, but now it won't build because my Android minSdk is 23 and this library wants 24 or newer. I'd like to keep supporting 23 because it makes about a 5% difference to the number of supported devices. Would it be possible for you to restore support for Android API 23 in version 4?

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • Update androidPlugin to v8.3.2 (com.android.application, com.android.library)
  • Update kotest to v5.8.1 (io.kotest.multiplatform, io.kotest:kotest-runner-junit5, io.kotest:kotest-framework-engine, io.kotest:kotest-assertions-core)
  • Update kotlin monorepo to v1.9.23 (org.jetbrains.kotlin.android, org.jetbrains.kotlin.multiplatform, org.jetbrains.kotlin:kotlin-gradle-plugin)
  • Update dependency io.github.gradle-nexus.publish-plugin to v2

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/dokka-update.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-java v4@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9
  • gradle/gradle-build-action v2@982da8e78c05368c70dac0351bb82647a9e9a5d2
  • EndBug/add-and-commit v9@1bad3abcf0d6ec49a5857d124b0bfb52dc7bb081
.github/workflows/run-tests.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-java v4@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9
  • gradle/gradle-build-action v2@982da8e78c05368c70dac0351bb82647a9e9a5d2
gradle
gradle.properties
settings.gradle.kts
build.gradle.kts
gradle/libs.versions.toml
  • org.jetbrains.kotlin:kotlin-gradle-plugin 1.9.22
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.8.21
  • io.kotest:kotest-assertions-core 5.8.0
  • io.kotest:kotest-framework-engine 5.8.0
  • io.kotest:kotest-runner-junit5 5.8.0
  • androidx.core:core-ktx 1.12.0
  • junit:junit 4.13.2
  • androidx.test.ext:junit 1.1.5
  • androidx.test.espresso:espresso-core 3.5.1
  • androidx.appcompat:appcompat 1.6.1
  • com.google.android.material:material 1.11.0
  • androidx.constraintlayout:constraintlayout 2.1.4
  • androidx.navigation:navigation-fragment-ktx 2.7.7
  • androidx.navigation:navigation-ui-ktx 2.7.6
  • com.diffplug.spotless 6.23.3
  • org.jetbrains.dokka 1.9.20
  • org.jetbrains.kotlin.multiplatform 1.9.22
  • io.kotest.multiplatform 5.8.0
  • com.android.library 8.3.1
  • io.github.gradle-nexus.publish-plugin 1.3.0
  • dev.petuska.npm.publish 3.4.2
  • com.android.application 8.3.1
  • org.jetbrains.kotlin.android 1.9.22
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.7
npm
package.json

  • Check this box to trigger a request for Renovate to run again on this repository

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

some typos in installation and usage guide (alguns erros de Digitação nos guias de instalação e uso)

Describe the bug
A clear and concise description of what the bug is.
From https://github.com/g0dkar/qrcode-kotlin
In installation:
Screenshot from 2024-01-13 20-47-37

Repo qrcode-kotline:4.1.1 not found
Execution failed for task ':compileKotlin'.

Could not resolve all files for configuration ':compileClasspath'.
Could not find io.github.g0dkar:qrcode-kotlin:4.1.1.
Searched in the following locations:
https://repo.maven.apache.org/maven2/io/github/g0dkar/qrcode-kotlin/4.1.1/qrcode-kotlin-4.1.1.pom

In usage:
Screenshot from 2024-01-13 20-46-47

val pngBytes = helloWorld.render() // return error None of the following functions can be called with the arguments supplied.
write(ByteArray!) defined in java.io.FileOutputStream
write(Int) defined in java.io.FileOutputStream

All issues was solved by changing :
Todos os problemas foram resolvidos alterando

  1. // Use this for both Android and JVM
    implementation("io.github.g0dkar:qrcode-kotlin:4.1.1")

To

implementation("io.github.g0dkar:qrcode-kotlin:4.1.0")

// By default, QRCodes are rendered as PNGs.
val pngBytes = helloWorld.render()
FileOutputStream("hello-world.png").use { it.write(pngBytes) }

To

// By default, QRCodes are rendered as PNGs.
val pngBytes = helloWorld.renderToBytes()
FileOutputStream("hello-world.png").use { it.write(pngBytes) }

Use custom color function to color each square of the position probe independently

Hi,

Since each position probe is rendered with the renderControlSquare, it is not possible to use a custom color function to color each square with a different color because they will all use the color of the parent square.

For now, I overwrote renderControlSquare in my custom shape function to produce the result I wanted but I was wondering if it was possible in a next version to only use a custom color function to do this (for example, by using renderSquare for all the squares)?

Thank you in advance for your answer and thanks for all the work you did so far on the library.

[iOS] Other shapes than squares

Describe the bug
Hello, when I try to use other shapes than squares on iOS generated library than the QR code is not visible at all. I tried to change parameters like color and sizes but the result is always the same. It works perfectly on Android (with same parameters).

To Reproduce
Steps to reproduce:

  1. Add .ofCircles() to QRCode builder
  2. Observe

Screenshots or other QRCodes rendered with other tools

Screenshot 2024-03-10 at 17 50 34 Simulator Screenshot - iPhone 15 - 2024-03-10 at 17 50 40

Additional context
Xcode 15.2

Result is same on physical device and Simulator

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.

Library broken

This library randomly produces invalid QR-Codes that can't be scanned.

Crash on QrCode with number only

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

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()

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

`BufferedImage` class not found

Describe the bug
I'm looking to use this library in my app but am encountering this error when generating QR codes

FATAL EXCEPTION: main
Process: , PID: 30803
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/awt/image/BufferedImage;
at qrcode.render.QRCodeGraphics.createImage(QRCodeGraphics.jvm.kt:27)
at qrcode.render.QRCodeGraphics.createImage$default(QRCodeGraphics.jvm.kt:25)
at qrcode.render.QRCodeGraphics.createGraphics(QRCodeGraphics.jvm.kt:33)
at qrcode.render.QRCodeGraphics.draw(QRCodeGraphics.jvm.kt:41)
at qrcode.render.QRCodeGraphics.draw$default(QRCodeGraphics.jvm.kt:39)
at qrcode.render.QRCodeGraphics.fillRect(QRCodeGraphics.jvm.kt:130)
at qrcode.render.QRCodeGraphics.fill(QRCodeGraphics.jvm.kt:135)
at qrcode.shape.DefaultShapeFunction.renderSquare(DefaultShapeFunction.kt:34)
at qrcode.QRCode$draw$1.invoke(QRCode.kt:140)
at qrcode.QRCode$draw$1.invoke(QRCode.kt:121)...

To Reproduce
I'm able to run the sample app in this repo no issue.
I'm able to generate QR codes after creating an empty project and copying files over.
I'm unable to generate QR codes from an existing project.

Anyone have suggestions on how to troubleshoot error for an existing app?

Expected behavior

QR codes should be generated from the existing app like it is generated in the sample or empty project app.

Screenshots or other QRCodes rendered with other tools

Additional context

QR codes not being generated properly for iOS

Describe the bug
The method getBytes() from QRCodeGraphics is not giving the correct data to generate a QRCode.

To Reproduce

  1. Instantiate any type of QRCode and try to use getBytes() method.
  2. Try to use the ByteArray generated in an iOS app.

Expected behavior
Expected the QRCode to be shown correctly once I pass the ByteArray to NSData, and then from NSData to UIImage.

Additional context
I actually have a fix for this issue and I opened a PR for this. I have found another issue regarding the logos with a background color different than Colors.TRANSPARENT that only occurs in iOS. I don't know if this could be also a good place to talk about it.

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.

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!

Circle QR code not recognized

Describe the bug
I created a QR code with the following code
val circleQRCode = QRCode.ofCircles().build("https://sample/alphaskfhdbfebwhnewnew/sdjnbchbwdhvbewhbvhuew") val circlePngData = circleQRCode.render()

To save image on .png format I use the following code (it will be works for android 13 and newest version)
internal class SavePhotoTask(private val context: Context) : AsyncTask<ByteArray?, String?, String?>() { protected override fun doInBackground(vararg jpeg: ByteArray?): String? { val photo = File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS).toString(), "photo.png") if (photo.exists()) { photo.delete() } try { val fos = FileOutputStream(photo.path) fos.write(jpeg[0]) fos.close() } catch (e: IOException) { Log.e("PictureDemo", "Exception in photoCallback", e) } return null } }

Note: No problem with scanning if I generate rectangle QR instead of circle , also your QR with name example01-circles.png was scanned perfectly but I do not now why since i used same code

Generated following QR
photo

Additional context

Finally, I accept that the generated image is not detected fast, for example, I use Google Scanner, the default application scanner but there are not working perfectly, freeze

I use for testing following devices:
Google pixel 7 (android 14)
Redmi not 9s (android 12)

Internet Required

I'm sorry, maybe I have misunderstood this. But does your library require an internet connection in order to be used?

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.

Issue when compiling for iosArm64

Hello community!

Describe the bug
So I'm having an issue while trying to compile my KMM project with this library. The error is the following:

e: Could not find "org.jetbrains.kotlin.native.platform.Symbols" in [/Users/my-user/Documents/X/my-project, /Users/my-user/.konan/klib, /Users/my-user/.konan/kotlin-native-prebuilt-macos-aarch64-1.9.10/klib/common, /Users/my-user/.konan/kotlin-native-prebuilt-macos-aarch64-1.9.10/klib/platform/ios_arm64]

To Reproduce
Easily reproducible by trying to use the linkDebugFrameworkIosArm64.

Expected behavior
To be able to generate the binaries for the Arm64 architecture.

Additional context
As you can tell by the error, I'm already using Kotlin 1.9.10 and I have a Mac with a M2 chip. Feel free to ask for additional info! 😃

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.