Closed noamamiran closed 4 years ago
try add this code before capture image :
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder(); StrictMode.setVmPolicy(builder.build());
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder(); StrictMode.setVmPolicy(builder.build());
that is work for me.
this solution worked!! thanks.
You are genius
Oh, I thought I have solved this issue. Now this still happens on Android N ?
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
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
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)
@toantk238
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder(); StrictMode.setVmPolicy(builder.build()); thsi work but by using this the security policy will become week.
On Android N, When trying to capture image from camera the following ex raised: FileUriExposedException: exposed beyond app through ClipData.Item.getUri()