Add KitKat support - requires Android SDK 19 or higher

This commit is contained in:
Sebastián Katzer
2013-12-15 11:09:02 +01:00
parent 51625b6d4b
commit b74d9f1825
5 changed files with 52 additions and 425 deletions

View File

@@ -39,11 +39,7 @@ Printer.prototype = {
callback.apply(scope || window, args);
};
if (device.platform == 'Android' && device.version >= '4.4') {
cordova.exec(callbackFn, null, 'KitKatPrinter', 'isServiceAvailable', []);
} else {
cordova.exec(callbackFn, null, 'Printer', 'isServiceAvailable', []);
};
cordova.exec(callbackFn, null, 'Printer', 'isServiceAvailable', []);
},
/**
@@ -61,11 +57,7 @@ Printer.prototype = {
return;
}
if (device.platform == 'Android' && device.version >= '4.4') {
cordova.exec(null, null, 'KitKatPrinter', 'print', [page, options]);
} else {
cordova.exec(null, null, 'Printer', 'print', [page, options]);
};
cordova.exec(null, null, 'Printer', 'print', [page, options]);
}
};