wymsee / cordova-imagePicker

Cordova Plugin For Multiple Image Selection
MIT License
407 stars 859 forks source link

Unable to set maximumImagescount to 1 in Android #53

Open lichiukenneth opened 9 years ago

lichiukenneth commented 9 years ago

Set to >= 2 is ok, if set to 1, in android, the following error message appears: "Get Picture Error: Cannot call method 'getPictures' of undefined". My javascript code is as follow:

function MeBtnGetPicture() { try { window.imagePicker.getPictures( function (results) { for (var i = 0; i < results.length; i++) { alert('Image URI: ' + results[i]); } }, function (error) { alert('Error: ' + error); }, { maximumImagesCount: 1, width: 100 } ); } catch (err) { alert("Get Picture Error:" + err.message); } }

lichiukenneth commented 9 years ago

Sorry, wrong information! It can be set to 1. The real problem is: everytime I build the solution, this function fail at the N + 1 built but succeed at the N + 2 built.