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

I used the moveTo() and can not locate the saved image

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 2.3.0
    • None
    • cordova-android
    • None

    Description

      I'm trying to save the picture in a specific folder in sdcard
      Everything is ok, however the picture does not appear in the gallery android

      navigator.camera.getPicture(getImageURI, function (message) { alert('Image Capture Failed'); }, {

      quality: 100,
      destinationType: Camera.DestinationType.FILE_URL,
      sourceType : Camera.PictureSourceType.CAMERA,
      saveToPhotoAlbum: false
      });

      function getImageURI(imageUri) {
      var gotFileEntry = function (fileSystem) {

      fileSystem.getDirectory("Marmovix", {create: true, exclusive: false}, moveFile);

      };
      function moveFile(dirEntry) {

      window.resolveLocalFileSystemURL(imageUri, function (fileEntry) { fileEntry.moveTo(dirEntry, "Marmovix.png", success, fsFail); }, fsFail);

      };

      window.resolveLocalFileSystemURL(cordova.file.externalRootDirectory, gotFileEntry, fsFail);

      Attachments

        Activity

          People

            Unassigned Unassigned
            LucasCosta Lucas Costa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: