'Generate QRCode from an URL in android device in Kotlin with SDK min 21

In 2022, I want to display a QRCode as bitmap within an app so that another user, on another device could easily retrieve the target URL on her own device using any standard QRCode reader.

I am well aware of https://github.com/zxing/zxing but it has limitations that are no go for me:

  • project is in maintenance mode
  • it has listed vulnerabilities in its dependency tree
  • it requires a too recent minimum SDK (I want to target min API 21)

Is there another option or a standard method to achieve this (generate a Bitmap from a random URL in Kotlin) that I might have missed ?

Thanks in advance for any tip.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source