Search code examples
androidkotlinqr-code

How to create an individual QR-Code and thus, make is unscannable for third devices?


I am currently implementing a library for generating and scanning of qr-codes and I'd like to ask, whether it's possible to make my QR-code somehow unique and val path unscannable for other devices if user does not use my app.

Is it actually possible using these dependencies implementation 'com.google.zxing:core:3.3.0' and implementation 'com.journeyapps:zxing-android-embedded:3.4.0'?


Solution

  • Of course it is possible to make a non-standards-compliant "QR code" that all stock apps would be unable/unwilling to interpret. I'm not sure that you could still call it a "QR code", in this case, but it could still look substantially the same.

    It is possible you could get most readers to ignore your barcode simply by screwing up the error-correction codes (that is, if you don't want to bother re-imagining the whole QR code format). You could use your own codes (for instance), or simply invert those bits that are involved in error-correction.

    I've never attempted this, and I don't know how to do it, directly, using the libraries you have mentioned.