Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70448

Camera is not defined

$
0
0

@machih-tkd wrote:

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.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70448

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>