BarcodeScanner Only Works on Ionic View App


#1

When build my app for Android native , my barcodescanner doesnt work, i dont know why, because when build the app in Ionic View works perfectly.

The errors log shows this;

ionic.bundle.js:21157 TypeError: Cannot read property ‘scan’ of undefined
at Object.scan (ng-cordova.js:596)
at Scope.$scope.scanner (app.js:89)
at fn (eval at compile (ionic.bundle.js:21972), :4:212)
at ionic.bundle.js:57514
at Scope.$eval (ionic.bundle.js:24673)
at Scope.$apply (ionic.bundle.js:24772)
at HTMLButtonElement. (ionic.bundle.js:57513)
at HTMLButtonElement.eventHandler (ionic.bundle.js:12098)
at triggerMouseEvent (ionic.bundle.js:2865)
at tapClick (ionic.bundle.js:2854)

Sorry for my bad inglish, tnks

Regards.


#2

Do you solve it now? I have the same problem as you . When i test on Ionic View App everything work fine,but when I deploy my app to my android device , All plugins aren’t work .Only Dialog plugin that work for me.Can someone help me?