Class QRCodeScannerSDK


  • public class QRCodeScannerSDK
    extends java.lang.Object
    Provides methods for QR Code and Cronto Code scanning
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static QRCodeScannerSDK.QRCodeScannerSDKDecodingResultData decodeImage​(android.media.Image image, int codeType)
      Decodes an image containing Cronto or QR code.
      Requires using CameraX API.
      Warning: The method processes the image and this could take some time to achieve.
      The process time depends on the size of the input image, make sure input image is not too big.
      Also, the decode process should be performed on another thread so that the main thread isn't blocked.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • decodeImage

        public static QRCodeScannerSDK.QRCodeScannerSDKDecodingResultData decodeImage​(android.media.Image image,
                                                                                      int codeType)
                                                                               throws QRCodeScannerSDKException,
                                                                                      java.lang.LinkageError
        Decodes an image containing Cronto or QR code.
        Requires using CameraX API.
        Warning: The method processes the image and this could take some time to achieve.
        The process time depends on the size of the input image, make sure input image is not too big.
        Also, the decode process should be performed on another thread so that the main thread isn't blocked.
        Parameters:
        image - Image object to decode
        codeType - indicates type of the image. A mask with possible values:
        - QRCodeScannerSDKConstants.CRONTO_CODE - QRCodeScannerSDKConstants.QR_CODE - QRCodeScannerSDKConstants.CRONTO_CODE + QRCodeScannerSDKConstants.QR_CODE
        Returns:
        QRCodeScannerSDKDecodingResultData containing decoded data and image format
        Throws:
        QRCodeScannerSDKException - in case the image could not be decoded
        java.lang.LinkageError