From fea6bb7938cb28e01e8776f59c6c45e32b91ffc5 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Thu, 21 Apr 2016 14:13:25 -0300 Subject: [PATCH] Fix camera permissions for Android 6 (#4102) --- cordova/build.sh | 5 ++--- src/js/directives/qrScanner.js | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cordova/build.sh b/cordova/build.sh index ab3b2a4c2..7deacbff8 100755 --- a/cordova/build.sh +++ b/cordova/build.sh @@ -84,13 +84,12 @@ if [ ! -d $PROJECT ]; then cordova plugin add https://github.com/florentvaldelievre/virtualartifacts-webIntent.git checkOK - if [ $CURRENT_OS != "WP8" ] + if [ $CURRENT_OS == "IOS" ] then cordova plugin add https://github.com/tjwoon/csZBar.git checkOK else - echo "${OpenColor}${Green}* Using plugin phonegap-plugin-barcodescanner for Windows Phone 8 ${CloseColor}" - cordova plugin add https://github.com/phonegap/phonegap-plugin-barcodescanner.git + cordova plugin add https://github.com/jrontend/phonegap-plugin-barcodescanner checkOK fi diff --git a/src/js/directives/qrScanner.js b/src/js/directives/qrScanner.js index e62bfd8bd..5de213651 100644 --- a/src/js/directives/qrScanner.js +++ b/src/js/directives/qrScanner.js @@ -30,7 +30,7 @@ angular.module('copayApp.directives') window.ignoreMobilePause = true; window.plugins.spinnerDialog.show(null, gettextCatalog.getString('Preparing camera...'), true); $timeout(function() { - if (!isMobile.Windows()) { + if (isMobile.iOS()) { cloudSky.zBar.scan({}, onSuccess, onError); } else { cordova.plugins.barcodeScanner.scan(onSuccess, onError);