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 2018/11/12 13:32:06 UTC

[GitHub] AutoAlert opened a new issue #373: Cannot take pictures on Android 8

AutoAlert opened a new issue #373: Cannot take pictures on Android 8
URL: https://github.com/apache/cordova-plugin-camera/issues/373
 
 
   If I try and take a photo on a device using Android 8 with targetSDK 26, i get an error 
   
   > file:///data/user/0/{mypackage}/cache/Capture.jpg exposed beyond app through ClipData.Item.getUri()
   
   Which I believe is due to changes in how apps can access the file system from Android Nougat.  See [
   https://stackoverflow.com/questions/38200282/android-os-fileuriexposedexception-file-storage-emulated-0-test-txt-exposed](url)
   
   I am using:
   
   - 8.1.2  (cordova-lib@8.1.1)
   - android 7.1.2
   - cordova-plugin-camera 4.0.3
   - cordova-plugin-console 1.0.3
   - cordova-plugin-file 6.0.1
   
   I have tried adding the following to my AndroidManifest.xml
   
   `<provider android:authorities="com.okappy.okappy.provider" android:exported="false" android:grantUriPermissions="true" android:name="android.support.v4.content.FileProvider">
           <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/camera_provider_paths" />
       </provider>`
   
   And the following to camera_provider_paths.xml
   
   `<paths xmlns:android="http://schemas.android.com/apk/res/android">
   <external-path name="external_files" path="."/>`
   
   But I get the same error unless I change the targetSDK to a lower value.  Is this something simple i'm missing or is it a bug in the plugin?
   
   Thanks
   Richard

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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