Run our Sample Apps
The best way to start working with the Scandit Data Capture SDK is to run one of our sample apps. In this guide we will go through the available apps and how to run them.
We have created both simple and advanced samples that show you how use various features of the Scandit Data Capture SDK. The simple samples allow you to get going quickly, while the advanced samples show you how to use additional settings and setup the scanner for the best user experience.
Here’s a list of our available samples on Cordova:
Run the Samples
Before you can run a sample app, you need to go through a few simple steps:
Sign in to your Scandit account and download the newest Cordova plugins at ssl.scandit.com/dashboard/sign-in. Unzip the archive and go to the samples folder.
Set the license key. To do this, sign in to your Scandit account and find your license key at ssl.scandit.com/dashboard/sign-in.
Once you have the license key, add it to the sample that you’d like to run:Scandit.DataCaptureContext.forLicenseKey('-- ENTER YOUR SCANDIT LICENSE KEY HERE --')
Create the Cordova project for the sample that you’d like to run. Make sure you always have the most recent version of Cordova installed.
For example, to create a Cordova project for the simple Barcode Capture sample in a helloscandit directory:cordova create helloscandit --template ./BarcodeCaptureSimpleSample
Make sure that you’re creating the Cordova project for the sample in the samples folder of the archive you downloaded, as the samples relatively reference the plugins included in the archive.
The BarcodeCaptureSettingsSample is built with Ionic. To get started with this sample, make sure to have Ionic installed locally and to prefix the following commands with “ionic”.
Add a platform to the Cordova project.
Once you created the Cordova project for the sample you’d like to run, navigate to the root of the project, e.g. cd helloscandit, and add the platform you’d like to run the sample on:cordova platform add [ios|android]
4a. Depending on the Cordova version you’re using, add the WKWebView dependency for iOS.
If you’re using Cordova 9.x or earlier, you’ll need to manually add a plugin to add WKWebView to the project. This was a breaking change between Cordova 9 and 10, and so the samples need slightly different steps to be ran depending on the version you’re using.
This step must not be done if using Cordova 10+, as the default webview on iOS is already set by Cordova to be of type WKWebView, so adding this plugin would cause issues.
If you’re unsure what Cordova version you’re using, you can check with the cordova -v command.cordova plugin add cordova-plugin-wkwebview-engine
4b. If using Cordova Android 9 or below, add the Whitelist plugin.
This was a breaking change between Cordova Android 9 and 10, and so the samples need slightly different steps to be ran depending on the version you’re using.
This step must not be done if using Cordova-Android 10.x or greater, as the Allow List functionality now is integrated into the core of Cordova Android.
If you’re unsure what Cordova Android version you’re using, you can check with the cordova platform version android command.cordova plugin add cordova-plugin-whitelist
Run the sample. We recommend running the samples on a physical device as otherwise no camera is available.
cordova run [ios|android] --device
You probably need to setup signing for iOS. To do this, open the Xcode project from platforms/ios and setup signing in the project settings. You can also run the sample from Xcode by clicking the Build & Run button.
New! Pre-built Barcode Scanning Component Samples
Scandit offers building blocks that can be integrated in just a few lines of code. The pre-built camera UI has been designed and user-tested to achieve superior process efficiency, ergonomics and usability.
Basic sample that uses the Barcode Selection API.
Demonstrates how you can adapt the barcode selection settings best to your needs and experiment with all the options.
Fully-customizable API: Single Scanning with Barcode Capture Samples
The Barcode Capture API offers developers a high level of flexibility with unlimited options for designing your own UI and workflow. You can use these samples as a starting point. We recommend that you familiarize yourself with our Best Practices for Usability to learn what to consider when using the Fully-customizable API.
Basic sample that uses the camera to read a single barcode.
Demonstrates the various ways to best integrate the scanner into the UI of your app.
Demonstrates how you can adapt the scanner settings best to your needs and experiment with all the options.
Sample that uses the camera to read a single QR code that starts with “09:” but ignores/rejects all other codes.
Fully-customizable API: MatrixScan Samples
The Barcode Tracking API offers developers a high level of flexibility with unlimited options for designing your own UI and workflow. You can use these samples as a starting point. We recommend that you familiarize yourself with our Best Practices for Usability to learn what to consider when using the Fully-customizable API.
Very simple sample which shows how you can highlight barcodes on screen with the Scandit Data Capture SDK.
Demonstrates the use of more advanced augmented reality use cases with the Scandit Data Capture SDK.
ID Scanning and Verification Samples
A basic ID Capture setup to scan front of ID Cards and barcodes from AAMVA documents.
A more advanced ID Capture setup.
Text Capture Samples
A basic Text Capture setup to recognize GS1 and LOT and integrate the parser.
All our samples can be found in the archive that can be downloaded from our dashboard. Check the following section for more details.