Overview

The Image Scanner SDK facilitates the Digipass application development: it provides you with the image scanning functionality to capture QR codes and Cronto images. The Image Scanner SDK package includes the following:

  • MSSImageScanner.xcframework for iOS
  • QRCodeScannerSDK.aar for Android

The Image Scanner SDK can be used on a variety of devices and supports the following platforms:

Android devices:

  • Minimum Android 6 (API level 23)
  • Target Android 13 (API level 33)

iOS devices:

  • iOS 13 or higher
  • Swift 5.0 or higher
  • Xcode 14 or higher

As of OneSpan Mobile Security Suite 4.20.0, the integration of the Image Scanner SDK has changed for iOS. For more information, see Integrate the Image Scanner SDK.

Image Requirements

The Image Scanner SDK requires the target image to meet the following requirements:

  • The image containing the QR code must be clear and well-focused.

  • The QR code should be in the center of the image.

  • The photo should not be taken too closely.

  • The maximum width and height is 2048 pixels (applies to iOS only).

Exposed APIs

The Image Scanner SDK APIs are exposed as follows:

  • Android: The APIs are exposed in the com.vasco.digipass.sdk.utils.qrcodescanner package.

Exception Management on Android

When an error occurs on Android, a QRCodeScannerSDKException is thrown. This exception consists of an error code and, if the exception is an internal error, the cause of the exception.

Error Codes

Error Codes lists the constants which can be retrieved from the QRCodeScannerSDKErrorCodes class.

Error Codes
Name Value Description
INTERNAL_ERROR –4500 Internal error.
INPUT_PARAMETER_NULL –4501 Call-back / delegate is null.
CAMERA_NOT_AVAILABLE –4502 Camera not present on the device.
PERMISSION_DENIED –4503 Permission to access the camera is not set.
NATIVE_LIBRARY_NOT_LOADED –4504 Native library has not been loaded (Android only).
INVALID_IMAGE –4505 Provided Image is invalid and cannot be decoded.
IMAGE_TOO_BIG –4506 Provided image is too big to process (iOS only)
INVALID_CODE_TYPE –4507 Provided code type is invalid and cannot be processed.

To be able to access the camera of the device, you need to set the appropriate permissions in your application configuration.

For Android, you need to add the CAMERA and VIBRATE permissions to the AndroidManifest.xml file.