You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/11/25 03:53:47 UTC

[GitHub] [cordova-plugin-camera] AndrWeisR opened a new issue #531: Can't get picture from downloads folder on Android 9

AndrWeisR opened a new issue #531: Can't get picture from downloads folder on Android 9
URL: https://github.com/apache/cordova-plugin-camera/issues/531
 
 
   # Bug Report
   
   ## Problem
   I'm using camera.getPicture to open an existing image on the device, in Android 9. I can select images in the gallery OK, but selecting images in the download folder throws an error and returns null for the image. Note on Android 8, opening images from the Downloads folder works.
   
   ### What is expected to happen?
   An image in the Downloads folder should be selectable on Android 9, the same as Android 8.
   
   
   ### What does actually happen?
   
   You get the following errors when you select an image in the Downloads folder, and null is returned for the image data:
   
   ```
   2019-11-25 13:44:52.088 4241-4241/com.android.documentsui D/PickerActionHandler: onFinished() [content://com.android.providers.downloads.documents/document/25]
   2019-11-25 13:44:52.099 3272-3272/com.app.myapp D/CordovaActivity: Incoming Result. Request code = 18
   2019-11-25 13:44:52.099 3272-3272/com.app.myapp D/CordovaInterfaceImpl: Sending activity result to plugin
   2019-11-25 13:44:52.101 3272-3272/com.app.myapp D/CordovaActivity: Started the activity.
   2019-11-25 13:44:52.102 3272-3272/com.app.myapp D/CordovaActivity: Resumed the activity.
   2019-11-25 13:44:52.109 2604-2645/android.process.media E/DatabaseUtils: Writing exception to parcel
       java.lang.IllegalArgumentException: Unknown URI: content://downloads/public_downloads/25
           at com.android.providers.downloads.DownloadProvider.query(DownloadProvider.java:933)
           at android.content.ContentProvider.query(ContentProvider.java:1055)
           at android.content.ContentProvider.query(ContentProvider.java:1147)
           at android.content.ContentProvider$Transport.query(ContentProvider.java:240)
           at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:102)
           at android.os.Binder.execTransact(Binder.java:731)
   2019-11-25 13:44:52.110 3272-4568/com.app.myapp D/CameraLauncher: File location is: null
   ```
   
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   Fails with all PictureSourceTypes and DestinationTypes.
   
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   ```
       const options: CameraOptions = {
         mediaType: this.camera.MediaType.PICTURE,
         correctOrientation: true,
         targetWidth: 1024,
         sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
         destinationType: this.camera.DestinationType.FILE_URI
       };
   
       this.camera.getPicture(options).then((imageData) => {
   ```
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   Android 9
   
   
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   Ionic 4.11.2
   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0
   Android 9
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [ x] I searched for existing GitHub issues
   - [ x] 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org