Adds new plugin for Android. Fix cancel
This commit is contained in:
parent
c5ae5d47c3
commit
a90503ac17
2 changed files with 21 additions and 20 deletions
|
|
@ -84,7 +84,7 @@ if [ ! -d $PROJECT ]; then
|
||||||
cordova plugin add https://github.com/florentvaldelievre/virtualartifacts-webIntent.git
|
cordova plugin add https://github.com/florentvaldelievre/virtualartifacts-webIntent.git
|
||||||
checkOK
|
checkOK
|
||||||
|
|
||||||
if [ $CURRENT_OS == "IOS" ]
|
if [ $CURRENT_OS != "WP8" ]
|
||||||
then
|
then
|
||||||
cordova plugin add https://github.com/tjwoon/csZBar.git
|
cordova plugin add https://github.com/tjwoon/csZBar.git
|
||||||
checkOK
|
checkOK
|
||||||
|
|
@ -135,17 +135,20 @@ if [ ! -d $PROJECT ]; then
|
||||||
cordova plugin add cordova-plugin-file@3.0.0
|
cordova plugin add cordova-plugin-file@3.0.0
|
||||||
checkOK
|
checkOK
|
||||||
|
|
||||||
cordova plugin add cordova-plugin-touch-id && cordova prepare
|
if [ $CURRENT_OS == "IOS" ]
|
||||||
checkOK
|
then
|
||||||
|
cordova plugin add cordova-plugin-touch-id && cordova prepare
|
||||||
|
checkOK
|
||||||
|
|
||||||
cordova plugin add cordova-plugin-transport-security
|
cordova plugin add cordova-plugin-transport-security
|
||||||
checkOK
|
checkOK
|
||||||
|
|
||||||
cordova plugin add cordova-ios-requires-fullscreen
|
cordova plugin add cordova-ios-requires-fullscreen
|
||||||
checkOK
|
checkOK
|
||||||
|
|
||||||
cordova plugin add cordova-plugin-disable-bitcode
|
cordova plugin add cordova-plugin-disable-bitcode
|
||||||
checkOK
|
checkOK
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,29 +11,27 @@ angular.module('copayApp.directives')
|
||||||
window.plugins.spinnerDialog.hide();
|
window.plugins.spinnerDialog.hide();
|
||||||
window.ignoreMobilePause = false;
|
window.ignoreMobilePause = false;
|
||||||
}, 100);
|
}, 100);
|
||||||
if (!isMobile.iOS() && result.cancelled) return;
|
if (isMobile.Windows() && result.cancelled) return;
|
||||||
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
var data = isMobile.iOS() ? result : result.text;
|
var data = isMobile.Windows() ? result.text : result;
|
||||||
$scope.onScan({ data: data });
|
$scope.onScan({ data: data });
|
||||||
}, 1000);
|
}, 1000);
|
||||||
};
|
};
|
||||||
|
|
||||||
var onError = function() {
|
var onError = function(error) {
|
||||||
function onError(error) {
|
$timeout(function() {
|
||||||
$timeout(function() {
|
window.ignoreMobilePause = false;
|
||||||
window.ignoreMobilePause = false;
|
window.plugins.spinnerDialog.hide();
|
||||||
window.plugins.spinnerDialog.hide();
|
}, 100);
|
||||||
}, 100);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.cordovaOpenScanner = function() {
|
$scope.cordovaOpenScanner = function() {
|
||||||
window.ignoreMobilePause = true;
|
window.ignoreMobilePause = true;
|
||||||
window.plugins.spinnerDialog.show(null, gettextCatalog.getString('Preparing camera...'), true);
|
window.plugins.spinnerDialog.show(null, gettextCatalog.getString('Preparing camera...'), true);
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
if (isMobile.iOS()) {
|
if (!isMobile.Windows()) {
|
||||||
cloudSky.zBar.scan({}, onSuccess, onError)
|
cloudSky.zBar.scan({}, onSuccess, onError);
|
||||||
} else {
|
} else {
|
||||||
cordova.plugins.barcodeScanner.scan(onSuccess, onError);
|
cordova.plugins.barcodeScanner.scan(onSuccess, onError);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue