Camera is not defined

Hello everbody,
Please can you help me to resolve this issue?

I deploy my app in android device to debug and testing my App.

I have a problem with my device, i can’t use camera to take picture here is detail informations :

Console message :

ReferenceError: Camera is not defined
at Scope.$scope.takePicture (ficheCondidatureController.js:129)
at fn (eval at compile (ionic.bundle.js:27643), :4:224)
at ionic.bundle.js:65429
at Scope.$eval (ionic.bundle.js:30400)
at Scope.$apply (ionic.bundle.js:30500)
at HTMLDivElement. (ionic.bundle.js:65428)
at defaultHandlerWrapper (ionic.bundle.js:16792)
at HTMLDivElement.eventHandler (ionic.bundle.js:16780)
at triggerMouseEvent (ionic.bundle.js:2953)
at tapClick (ionic.bundle.js:2942)
(anonymous) @ ionic.bundle.js:26799

My command ionic info :
Your system information:

cordova CLI: 9.0.0 (cordova-lib@9.0.1)
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v8.9.4
Xcode version: Not installed

Console : ionic.version “1.3.4”

$scope.takePicture = function () {
alert(“Start camera !”)
var options = {
destinationType: Camera.DestinationType.FILE_URI,
sourceType: Camera.PictureSourceType.CAMERA,
encodingType: Camera.EncodingType.JPEG,
quality: 40,
saveToPhotoAlbum: false,
// targetWidth: 150,
// targetHeight: 110,
var candidatIds = window.localStorage.getItem(‘candidatID’);

            function (imageURI) {
                $scope.imgURI = imageURI;
                BddService.updatePicture(candidatIds, imageURI);
            function (err) {

Best regards.

Don’t know about the issue but better use ionic 3 or 4.

1 Like

Thanks for you reply but i can’t do it because, i’m working in a existing project so i have to work with this version. Hope there is someone who can help me to resolve this issue.

There is a lot of problem in this version, every day i encounter several problem especially with working environment