Camera windows phone 8.1

Hi there,

I’m facing a problem with the camera plugin on wp8.1.
Im using the following code:

    var options = {}
        navigator.camera.getPicture(options).then(function (imageData) {
            $scope.imgURI = "data:image/jpeg;base64," + imageData;
        }, function (err) {
            // An error occured. Show a message to the user
        });

On android and IOS this works, it shows the camera but on wp nothing shows up and nothing happens not even a error.

Anybody that can help me? I’m using visual studio 2015

Remove the plugin org.apache.cordova.camera using

cordova plugin remove camera

and add the cordova-plugin-camera

cordova plugin add cordova-plugin-camera

My issue was that I was using the outdated plugin which was not updated for windows (0.3.x). the proper version should be 1.x.x

I’m using visual studio to add the plugins, where can i find the plugin that works?

I tried using visual studio to add the plugin but it did not work for me. It is very easy to use command prompt to override the visual studio plugin. Just cd to the root folder of your visual studio project, and run the commands above. It will not mess up your project. Hope that helps!

I tried your way, but still the same error. Why isn’t working !

It’s getting better, now the camera shows up but when ik click the ‘take’ button you can hear a click and then nothing happens?? the only thing you can do is hit the cancel button.

I am using visual studio community 2015,

its not working for me in windows phone 8.1, i get error, javascript runtime exception NotFoundError and app crashes.

ionic 1.7
cordova 6.0
cordova-plugin-camera 2.1.0
visual studio community 2015

Hi ! Have you found any solutions? Thank you for your collaboration