Skip to main content

SDK Initialization

License Key

The Docutain Barcode Scanner SDK needs a valid, non-expired license key in order to work. The license key is bound to the widget id defined in your app's config.xml file. Any attempt to use a license key in an app with a different widget id will fail.

Trial license

The Docutain SDK is a commercial product and requires a paid license for production use. In order to get a trial license, please visit our website via https://sdk.docutain.com/TrialLicense to generate a trial license key.

Production license

To get information about the SDK's functionality and pricing and to purchase a production license, please contact us.

Initialize

In order to use any functionality of the SDK, you must initialize it first. Add the following code to your app


document.addEventListener('deviceready', onDeviceReady, false);

async function onDeviceReady() {
try {
await DocutainSDKBarcode.initSDK(License_Key);
} catch (e) {
console.log('initSDK ' + License_Key + ' failed: ' + e)
...

caution

If the initialization fails, you are responsible to deactivate access to SDK functionality.