Pick() is only supported on iOS platform
This commit is contained in:
parent
bf1b308750
commit
652c6c62c2
@ -17,7 +17,9 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var exec = require('cordova/exec');
|
var exec = require('cordova/exec'),
|
||||||
|
ua = navigator.userAgent.toLowerCase(),
|
||||||
|
isIOS = ua.indexOf('ipad') > -1 || ua.indexOf('iphone') > -1;
|
||||||
|
|
||||||
// Defaults
|
// Defaults
|
||||||
exports._defaults = {
|
exports._defaults = {
|
||||||
@ -141,7 +143,11 @@ exports.pick = function (options, callback, scope) {
|
|||||||
var fn = this._createCallbackFn(callback, scope),
|
var fn = this._createCallbackFn(callback, scope),
|
||||||
params = this._mergeWithDefaults(options || {});
|
params = this._mergeWithDefaults(options || {});
|
||||||
|
|
||||||
|
if (isIOS) {
|
||||||
exec(fn, null, 'Printer', 'pick', [params]);
|
exec(fn, null, 'Printer', 'pick', [params]);
|
||||||
|
} else if (fn) {
|
||||||
|
fn(null);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user