Skip to main content

SDK Initialization | Capacitor Barcode Scanner

License Key

In order to run the Scanbot SDK within your production app, you must purchase and use a valid Scanbot SDK license.

Each license key is valid only for a given app bundle identifier. You will be unable to use any of the SDK features if the license key is corrupted, expired, or invalid in any other way.

Example code for defining and using the license key:

Scanbot Barcode Scanner SDK Initialization With License Key
loading...

Getting a Trial License

The Scanbot SDK will run without a license for one minute per session! To get a free, "no-strings-attached" 7-day trial license, please submit the Trial License Form on our website.

Please kindly note that a trial license can only be used in a development and staging environment. You are not allowed to publish your app to the App Store, Play Store, or any 3rd party Android App Store with a trial license.

Purchase a Production License

To get pricing information and purchase a production license for the Scanbot SDK, please request a quote.

App Identifier

Every app has a unique identifier (sometimes also known as "bundle identifier" or "application ID"). Your license will be bound to this identifier. To request a trial license or purchase a production license you have to provide us the bundle identifier of your app.

Initialization

Free Developer Support

We provide free "no-strings-attached" developer support for the implementation & testing of the Scanbot SDK. If you encounter technical issues with integrating the Scanbot SDK or need advice on choosing the appropriate framework or features, please visit our Support Page.

ScanbotBarcodeSDK.initializeSdk(config): Promise

The Scanbot Barcode Scanner SDK must be initialized before usage. Make sure to run the initialization only once per app lifetime. This should ideally be done at the earliest point in the application's lifecycle. Typically, the App.tsx file is good practice because it ensures that the Scanbot Barcode Scanner SDK is ready for use as soon as the app starts.

Scanbot Barcode Scanner SDK Initialization
loading...

Please check all available initialization properties here.

Logging

When initializing the Scanbot Barcode Scanner SDK you can enable logging of the SDK. By default, logging is disabled.

Scanbot Barcode Scanner SDK Initialization With Logging
loading...

On Android logs are printed into LogCat as well as saved on the device. You can find them in Environment.getExternalStorageDirectory()/debug_logs/[package_name]. Usually it is /sdcard/debug_logs/[package_name]. The easiest way to check the log outputs on Android is to use the Android Debug Bridge (adb) (e.g. $ adb -s <DEVICE_ID> shell "logcat").

On iOS all logs are printed to the console. Please use Xcode to check the log outputs.

You can also see application logs in the Web Browsers. Find out more how to debug with the Web Browsers here.

Please note: While it may be useful for development, consider switching logging OFF in production builds for security and performance reasons!

Want to scan longer than one minute?

Generate a free trial license to test the Scanbot SDK thoroughly.

Get your free Trial License

What do you think of this documentation?