Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.


See original GitHub issue

When I use CameraImagePicker pickImage() on Android 7.0 (N) on Nexus 5x, with an app targeting/compiling SDK 24, I have

D/ImagePickerImpl: Temp Path for Camera capture: /storage/emulated/0/AppName/AppName Pictures/061aafec-0acd-488d-b8b0-c7d5fb8c152a.jpg
E/FileUpload: <> FileUriExposedException: android.os.FileUriExposedException: file:///storage/emulated/0/AppName/AppName%20Pictures/061aafec-0acd-488d-b8b0-c7d5fb8c152a.jpg exposed beyond app through ClipData.Item.getUri()
W/System.err:     at android.os.StrictMode.onFileUriExposed(
W/System.err:     at
W/System.err:     at android.content.ClipData.prepareToLeaveProcess(
W/System.err:     at android.content.Intent.prepareToLeaveProcess(
W/System.err:     at android.content.Intent.prepareToLeaveProcess(
W/System.err:     at
W/System.err:     at
W/System.err:     at
W/System.err:     at
W/System.err:     at
W/System.err:     at
W/System.err:     at com.kbeanie.multipicker.core.PickerManager.pickInternal(
W/System.err:     at com.kbeanie.multipicker.core.ImagePickerImpl.takePictureWithCamera(
W/System.err:     at com.kbeanie.multipicker.core.ImagePickerImpl.pick(
W/System.err:     at com.kbeanie.multipicker.api.CameraImagePicker.pickImage(

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

livotovcommented, Sep 10, 2016

I fixed that. The problem is you don’t create the final subfolder (“pictures” or “videos”, etc) in your PickerManager.getNewFileLocation method, so the file provider cannot find the final destination folder. Adding file.mkdirs(); solved the problem, just sent you a pull request with the fix.

coomar2841commented, Aug 24, 2016

Uploaded a beta build for testing it out…

compile 'com.kbeanie:multipicker:1.1.2-beta@aar'

Read more comments on GitHub >

github_iconTop Results From Across the Web

FileUriExposedException - Android Developers
On this page; Summary. Public constructors; Inherited methods. Public constructors. FileUriExposedException. Android Developers.
Read more >
file:///storage/emulated/0/test.txt exposed beyond app through ...
But A file path String never hurt anybody, so it works without throwing FileUriExposedException. Tested on API levels 9 to 29! Successfully opens...
Read more >
What is android.os.FileUriExposedException and what you ...
This error occurs when you try to share a file:// Uri in an Intent broadcast to share data with other apps. Using file://...
Read more >
How To Handle "android.os.FileUriExposedException" In ...
Open Android Studio and select "Create new project". Name the project as per your wish and select your activity template. How To Handle...
Read more >
android.os.FileUriExposedException on Android Studio
File Uri Exposed Exception : android.os. fileUriExposedException use File Provider to soled the above exception.FileProvider is a special ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found