Integrate the Image Scanner SDK

Prev Next

Android

To use the Image Scanner SDK in your Android project

  1. Copy QRCodeScannerSDK.aar from the OneSpan Mobile Security Suite to the libs folder.

  2. Declare QrScannerSDKActivity in your application manifest (refer to the Image Scanner SDK sample for details).

  3. Add a dependency on the official ZXing wrapper to your project, using zxing-c-android-library_2.3.0.

To be able to access the camera, you need to set the appropriate permissions in your application configuration. The CAMERA and VIBRATE permissions must be added to the AndroidManifest.xml file.

For applications that target API 23 and run on Android 6.0+, the CAMERA permission must be explicitly requested at runtime. Refer to the Android sample for more details.

For applications that target an API earlier than 23 and run on Android 6.0+: If the user first grants permission upon installation and then denies the permission in the device settings, the Image Scanner SDK may not work as expected (as indicated by the Android system).

You are now ready to use the Image Scanner SDK.

iOS

To use the Image Scanner SDK in your iOS project

  1. Link MSSImageScanner.xcframework from the OneSpan Mobile Security Suite package to your Xcode project (linked framework and libraries).

  2. (Only required if the project is compiled in Objective-C and not in Objective-C++) Link the libc++ library from the iOS SDK to your Xcode project with the Link Binary With Libraries build phase.

Be aware of the following:

  • Your project must be compiled with the libc++ standard library.

  • When using the camera, NSCameraUsageDescription should be added to the Info.plist file of the project.

You are now ready to use the Image Scanner SDK.

API reference documentation and sample applications

To learn more about the public APIs and their functions, exceptions, and error codes, refer to the technical documentation that is included in the product package for each SDK and each platform. In the product package, you can also find the sample applications provided for each platform to see examples of how the SDKs can be used.

These sample apps are intended only to demonstrate basic scenarios and SDK usage. They are not designed to be copied directly into production projects!