dominic-simplan opened a new issue #746:
URL: https://github.com/apache/cordova-plugin-camera/issues/746


   # Bug Report
   
   ## Problem
   
   ### What is expected to happen?
   Calling `camera.getPicture()` with options
   ```
   getPicture({
      sourceType: Camera.PictureSourceType.SAVEDPHOTOALBUM,
      destinationType: Camera.DestinationType.FILE_URI,
   }
   ```
   should return a fileURL which can be processed with 
`window.resolveLocalFileSystemURL()`
   
   
   ### What does actually happen?
   If I select an image from my photo gallery, getPicture returns 
"`/storage/emulated/0/DCIM/Camera/PXL_xyz.jpg`".
   When I try to resolve this URL with `window.resolveLocalFileSystemURL`, I 
get `FileErrorĀ {code: 5}`.
   
   Only a few directories seem to work. For example, if I select a file from 
the screenshot directory, I get the following URL: 
"`file:///data/user/0/de.appname/cache/Screenshot_20210607-075901.png?1626272750921`".
 This can be resolved correctly.
   
   
   ## Information
   <!-- Include all relevant information that might help understand and 
reproduce the problem -->
   Already tried adding the following to my config.xml but nothing changed:
   ```
   <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" 
target="/manifest/application">
         <application android:requestLegacyExternalStorage="true" />
   </edit-config>
   ```
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   
   
   ### Environment, Platform, Device
   Google Pixel 4a
   Android 11
   
   
   
   ### Version information
   Cordova CLI 10.0.0
   cordova-android: 9.0.0
   cordova-plugin-camera: 5.0.1
   cordova-plugin-file: 6.0.2
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [ ] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to