Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android N FileUriExposedException: exposed beyond app through ClipData.Item.getUri() #11

Closed
noamamiran opened this issue Feb 7, 2017 · 11 comments · Fixed by #27
Closed

Comments

@noamamiran
Copy link

On Android N, When trying to capture image from camera the following ex raised: FileUriExposedException: exposed beyond app through ClipData.Item.getUri()

@saeid-pm
Copy link

saeid-pm commented Dec 6, 2017

try add this code before capture image :

StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());

@BambangHeriSetiawan
Copy link

StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());

that is work for me.

@cristian9016
Copy link

cristian9016 commented Apr 23, 2018

this solution worked!! thanks.

@Albatoul
Copy link

Albatoul commented Mar 8, 2019

You are genius

@toantk238
Copy link
Collaborator

Oh, I thought I have solved this issue. Now this still happens on Android N ?

@vanyasem
Copy link

That's a dirty workaround and not a proper solution. Refer to https://stackoverflow.com/questions/48117511/exposed-beyond-app-through-clipdata-item-geturi for more details

@PrasanthKumarKatta
Copy link

PrasanthKumarKatta commented Oct 3, 2019

     Caused by: java.lang.SecurityException: 
Permission Denial: opening provider android.support.v4.content.FileProvider from ProcessRecord{24ff435 15339:com.android.gallery3d/u0a44} (pid=15339, uid=10044) that is not exported from uid 10138

@PrasanthKumarKatta
Copy link

PrasanthKumarKatta commented Oct 3, 2019

StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());

that is work for me.

 Caused by: java.lang.SecurityException: Permission Denial: opening provider android.support.v4.content.FileProvider from ProcessRecord{24ff435 15339:com.android.gallery3d/u0a44} (pid=15339, uid=10044) that is not exported from uid 10138

ava.lang.IllegalStateException: Binder has been finalized!
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:622)

@abhisheksharma18021999
Copy link

@toantk238

toantk238 pushed a commit that referenced this issue Sep 8, 2020
- Fix #19
@aasinationskie
Copy link

StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());
thsi work but by using this the security policy will become week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants