Qr Scanner

class QrScanner(handler: CameraXHandler, action: (Boolean, String) -> Unit) : ImageAnalysis.Analyzer

Handler class for Scanning QR Code purposes

Author

Jimly A.

Since

05-Sep-21

Parameters

handler

instance of CameraXHandler

action

Custom listener for the app to handle read QR

Constructors

Link copied to clipboard
fun QrScanner(handler: CameraXHandler, action: (Boolean, String) -> Unit)

return instance of the QrScanner

Functions

Link copied to clipboard
open override fun analyze(image: ImageProxy)

Default method to analyze image

Link copied to clipboard
fun scanBitmap(bitmap: Bitmap)

Method to scan barcode from bitmap

Link copied to clipboard
fun scanFile(ctx: Context, uri: Uri)

Method to scan barcode from image file

Link copied to clipboard
fun startScan()

method to start scan for QR code in the camera, this method add Use case to the handler

Sources

Link copied to clipboard