License Initialization
Get a trial key
- The
BarcodeReader
module of Dynamsoft Capture Vision needs a valid license to work. - A time-limited public trial license is available for every new device for the first use of Dynamsoft Capture Vision. You can find the public trial license on the following parts of this page.
- If your public trial key is expired, please visit Private Trial License Page to get a 30-day trial extension.
Get a full license
- Contact us to purchase a full license
Initialize the license
The following code snippets are using the public trial license to initialize the license. You can replace the public trial license with your own license key.
- React Native
- Flutter
- Xamarin.Forms
- Cordova
// Open the **App.js** file. In componentDidMount, add the following code: componentDidMount() { (async () => { try { await DCVBarcodeReader.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9") } catch (e) { console.log(e) } })(); }
void main() async { WidgetsFlutterBinding.ensureInitialized(); try { await DCVBarcodeReader.initLicense(license: 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9'); } catch (e) { print('license error = $e'); } }
public partial class App : Application, ILicenseVerificationListener { public static IDCVBarcodeReader barcodeReader; public static IDCVCameraEnhancer camera; public App(IDCVCameraEnhancer dce, IDCVBarcodeReader dbr) { InitializeComponent(); camera = dce; barcodeReader = dbr; barcodeReader.InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", this); } public void LicenseVerificationCallback(bool isSuccess, string msg) { if (!isSuccess) { System.Console.WriteLine(msg); } } }
try { await Dynamsoft.DCVBarcodeReader.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9"); } catch (e) { console.log(e) }