2

Does anybody have experience integrating external libraries with Drupalgap (in particular the BarcodeScanner)? I've been able to get BarcodeScanner working with Phonegap relatively easily but Drupalgap's architecture is more complicated and requires using a function to acces. Any help would be great!

Here's the BarcodeScanner info:

https://github.com/cfjedimaster/Cordova-Examples

I created a project from scratch using Cordova, added the plugin according to the readme, and then copied the contents of www from the repo to my project. This works great standalone. How do I add this button to Drupalgap so I can scan barcodes from within the app?

1

After setting up the plugin in phonegap simply add this to a page:

var html = theme('button_link', { text: 'Start Scan', path: null, attributes: { onclick: "startScan()" } });
$('#my_container').html(html).trigger('create');

Thanks to TylerFrankenstein for this one.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.