Hi Sai,
It is important to say that the barcodeScanner object can be used only after the deviceReady event has fired. In other words, you can check if the pasted code would work executed on deviceready.
I would recommend you to check the BarcodeScanner sample app in our documentation. Trying it in AppBuilder, you will notice the scripts\main.js file in which the JS code for the BarcodeScanner functionality resides.
Further, you can also check the BarcodeScanner sample from the Telerik Verified Plugin Marketplace. It explains how the plugin works in even greater details.
I hope this helps.
Regards,
Kaloyan
Telerik
It is important to say that the barcodeScanner object can be used only after the deviceReady event has fired. In other words, you can check if the pasted code would work executed on deviceready.
I would recommend you to check the BarcodeScanner sample app in our documentation. Trying it in AppBuilder, you will notice the scripts\main.js file in which the JS code for the BarcodeScanner functionality resides.
Further, you can also check the BarcodeScanner sample from the Telerik Verified Plugin Marketplace. It explains how the plugin works in even greater details.
I hope this helps.
Regards,
Kaloyan
Telerik
Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.