Add the SDK to Your App#

This guide shows you how to add the Scandit Data Capture SDK to current existing project.

Prerequisites#

  • The latest stable version of Cordova, Node.js and npm.

  • A project with minimum iOS deployment target of 9.0 or higher. Or an Android project with target SDK version 19 (4.4 KitKat) or higher.

  • A valid Scandit Data Capture SDK license key. You can sign up for a free test account at ssl.scandit.com/customers/new?p=test.

Note

Android devices running the Scandit Data Capture SDK need to have a GPU or the performance will drastically decrease.

Get a License Key#

  1. If you don’t have a scandit account yet, create a free test account at ssl.scandit.com/customers/new?p=test.

  2. Sign in to your account at ssl.scandit.com/sessions/new.

  3. Select “License Keys” from the left-hand menu

  4. If you don’t have a license key for your app yet, click “Create native SDK license key” and enter the bundle ID for your project.

  5. Copy the license key.

Should you have a paid subscription, please reach out to support@scandit.com if you need a new license key.

Add the SDK#

Currently we support adding the Scandit Data Capture SDK Cordova plugins to you project by manually downloading the plugins and adding them to your Cordova project. Let’s take a look at the steps needed to do this.

Get the Scandit Data Capture SDK#

After you downloaded the archive containing all the plugins at ssl.scandit.com/sdk, unzip the archive. It includes the available Cordova plugins, including the scandit-cordova-datacapture-core plugin that all other plugins depend on.

Create a new project (optional)#

If you do not have a Cordova project yet that you’ll use, you should create a new one.

> cordova create helloscandit --id "com.scandit.helloscandit"
> cd helloscandit
> cordova platform add [ios | android]

Add the plugin to your project#

Use the Cordova CLI to add the plugin(s) to your already existing project.

You should first always add the scandit-cordova-datacapture-core plugin, as all other plugins depend on it:

cordova plugin add <path to scandit-cordova-datacapture-core plugin>

Once this is done, you can continue with adding the plugin for your desired functionality, e.g. for barcode capture, add the scandit-cordova-datacapture-barcode plugin:

cordova plugin add <path to scandit-cordova-datacapture-barcode plugin>

To update plugins, make sure to follow Cordova best practices and remove the plugin before adding the new version:

cordova plugin remove <id of the plugin being updated>
cordova plugin add <path to the newer version of the plugin>

Create a Test License Key#

  1. Sign in to your account at ssl.scandit.com/sessions/new.

  2. Select “License Keys” from the left-hand menu

  3. Click “Create native SDK license key” and enter the bundle ID for your project.

Should you have a paid subscription, please reach out to support@scandit.com if you need a new license key.

Additional Information#

  • When using the Scandit Data Capture SDK you will want to set the camera as the frame source for barcode capture. The camera permissions are handled by the plugins, so you don’t need to specify anything explicitly.

Next steps#

You are now ready to tackle the following guides: