# Camera is not defined

**URL:** <https://forum.ionicframework.com/t/camera-is-not-defined/163589>\
**Category:** ionic-v1\
**Created:** [May 10, 2019, 1:44pm UTC](https://forum.ionicframework.com/t/camera-is-not-defined/163589 "2019-05-10T13:44:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![machih-tkd](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@machih-tkd](https://forum.ionicframework.com/u/machih-tkd)\
**Post date:** [May 10, 2019, 1:44pm UTC](https://forum.ionicframework.com/t/camera-is-not-defined/163589/1 "2019-05-10T13:44:42Z")

</div>

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”

Code  
$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’);

```
        $cordovaCamera.getPicture(options).then(
            function (imageURI) {
                $scope.imgURI = imageURI;
                BddService.updatePicture(candidatIds, imageURI);
            },
            function (err) {
            });
    } 

```

Best regards.

---

<div class="post-metadata">

**Author:** ![vivek-23](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/vivek-23/32/125332_2.png) [@vivek-23](https://forum.ionicframework.com/u/vivek-23)\
**Post date:** [May 10, 2019, 1:50pm UTC](https://forum.ionicframework.com/t/camera-is-not-defined/163589/2 "2019-05-10T13:50:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![machih-tkd](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@machih-tkd](https://forum.ionicframework.com/u/machih-tkd)\
**Post date:** [May 10, 2019, 2:31pm UTC](https://forum.ionicframework.com/t/camera-is-not-defined/163589/3 "2019-05-10T14:31:01Z")

</div>

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
