cfjedimaster / Cordova-Examples

A collection of Cordova/Ionic/etc demos.
982 stars 1.07k forks source link

When click the button on android 4.4 nothing happens? #25

Closed l-lawliett closed 7 years ago

cfjedimaster commented 7 years ago

What demo are you talking about? DId you remote debug?

l-lawliett commented 7 years ago

Option One - Camera API Yeah i took the code add it in a new ionic then when i click the button happen

l-lawliett commented 7 years ago

it as work now man i was using the wrong name for the method invoke haha

l-lawliett commented 7 years ago

Well it allow me to select the image but the {{img}} not displaying am still looking in to it

cfjedimaster commented 7 years ago

Ok, but to be clear, I still don't know what demo your talking about. It would be helpful to include the URL of the blog entry and the particular subdirectory containing the code.

l-lawliett commented 7 years ago

https://www.raymondcamden.com/2014/06/04/ngCordova-Released/

l-lawliett commented 7 years ago

https://github.com/cfjedimaster/Cordova-Examples/tree/master/multiimageselect/multiimageselect1

cfjedimaster commented 7 years ago

Ok, that's a pretty old blog entry - so it may not work terribly well. Also, the blog entry you shared does NOT use the source code in the example you linked to. Are you getting them confused?

l-lawliett commented 7 years ago

sorry https://www.raymondcamden.com/2015/03/12/selecting-multiple-images-in-a-phonegapcordova-app/

l-lawliett commented 7 years ago

thats the blog

l-lawliett commented 7 years ago

i was reading a good amount of your posts

cfjedimaster commented 7 years ago

Ah, ok, well I'd still suggest remote debugging to see if it helps with the problem.

l-lawliett commented 7 years ago

yeah okay I will let you know when reading your blog gave me an idea with good blogs like yours why not set it like github where some one can update the tutorial an you could merge it if it works an new so its like a tutorial github that would be past great an open one for dev in all language an frameworks and programming tools for as we can see good work can become ancient but still relevant

cfjedimaster commented 7 years ago

Well, my tutorials are the writing parts and for that - I don't want to use GitHub. I want the source code here so folks can easily run with it if they want to build it themselves. But now we're a bit off topic. ;)

l-lawliett commented 7 years ago

yeah sorry

l-lawliett commented 7 years ago
    var options = {
        quality: 50,
        destinationType: Camera.DestinationType.FILE_URI,
        sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
        encodingType: Camera.EncodingType.JPEG,
        targetWidth: 200,
        targetHeight: 200
    };

    $cordovaCamera.getPicture(options).then(function(imageData) {
         var image = document.getElementById('myImage');
         image.src = imageData;

    }, function(err) {
    // error
    });

};

Well thats the proper way to do it now also the only thing missing is encodingType: Camera.EncodingType.JPEG, from the blog well we can say this is one way okay so for future users this can be use

cfjedimaster commented 7 years ago

Ok, thanks!