Search code examples
javaandroidfirebasekotlinfirebase-mlkit

Firebase Android ML Kit: Way to hide display values on QR code


I am using Firebase ML Kit for Qr code scanning. I have implemented it successfully and its working fine. Now I just need to find a way if there is, to hide the Information (url, ids, display values etc) shown on the image of Qr code. Below is an image where url can be seen

enter image description here


Solution

  • Library lets you do whatever you like: show the url on screen or just have in code and process it differently. Normally, you have Bitmap object of image and give it to Barcode Recognizer class and it gives you String value:

    FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);
    

    More Detailed Instructions here

    The screen you showed, is just google's implementation, where code is written to show the read value. They draw white rectangle and url in class BarcodeGraphic, you can comment URL part and it will not be drawn: enter image description here