Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-12909

cordova-plugin-camera crashes after taking picture

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • cordova@7.0.0
    • None
    • cordova-plugin-camera
    • None
    • Android

    Description

      Im using cordova version 7+
      and android version 4.4.4

      This works if i pick an image from my library, but not with camera.
      After i capture the image, the app simply restarts or sometimes crashes.

      here is my code:

      options: CameraOptions =

      { quality: 75, destinationType: this.camera.DestinationType.FILE_URI, encodingType: this.camera.EncodingType.JPEG, mediaType: this.camera.MediaType.PICTURE, sourceType: this.camera.PictureSourceType.CAMERA, targetWidth: 200, targetHeight: 200, saveToPhotoAlbum: true, }

      ;

      this.camera.getPicture(this.options).then((data) => {
      if (data.substr(0, 7) == 'content') {
      this.filePath.resolveNativePath(data).then(newPath =>

      { this.startUpload(); // external function }

      )
      } else

      { this.startUpload(); }

      }, err => {
      });

      Attachments

        Activity

          People

            Unassigned Unassigned
            craftpip boniface pereira
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: