The BarcodeScanner plugin in ngCordova doesnt work in Android 6

爱⌒轻易说出口 提交于 2019-12-25 07:40:33

问题


I'm developing in Ionic Framework.The barcodeScanner plugin(ngCordova) doesn't work for the newest version of Android. I suspect the plugin is not updated for this version. Any of you have found a solution? Thanks.


回答1:


Samuel Paredes, There is many change in Android 6(M) , the main is runtime permissions, so we need the camera for the barcode scanner , but the plugin is not yet updated for that so we need to On the Camera permisson for the application manuully.

Setting >> APP manager >> Your App >> Permissions >>Camera >> 

Please enable the camera permission from there. Hope it will help you




回答2:


We have this problem too. To solve it we have done this : ionic platform add android@4.1 and it solve the problem




回答3:


I have this problem: Sorry, the android camera encountered a problem. You may need to restar the device

http://i.stack.imgur.com/0nHW3.png




回答4:


Droid Tech, will this be resolved in the near future? Is there some way to monitor or to get a notification when this bug is solved?




回答5:


Same error happened to me. A guy on Github forked the plug-in and fixed it, take a look here.

basically, remove the barcode scanner plugin you have right now and add the new one like this:

cordova plugin add https://github.com/jrontend/phonegap-plugin-barcodescanner

It works exactly the same way.



来源:https://stackoverflow.com/questions/36593088/the-barcodescanner-plugin-in-ngcordova-doesnt-work-in-android-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!