Closed nidhinprathap closed 6 years ago
Have fixed and updated the code in the given forked repo
Thank you very much for your collaboration @nidhinprathap . I couldn't test your changes yet on Android O, but I hope to do it soon. If someone else can test it and check everything is ok before merge this will be helpful.
You can use this as a workaround untils it's fixed (put it where you are using the library):
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());
Hi,
I tested both the original and the forked repo on Android O. I found that while the original indeed crashes with the trace @nidhinprathap wrote, the forked version works like a charm (after granting storage permission manually in App Settings).
Thus I recommend merging the pull request, @Mariovc.
In the meantime, the workaround posted by @GrenderG seems to be working as well.
@metzing it is not working as expected. I get some errors. Check this out on #24 The workaround of @GrenderG may work but it is not the right way to do this.
@Mariovc the updated version worked on my pixel except for the camera part once I launch the camera I take a pic and press the correct button the camera app crashes not the app. any suggestions?
Can anyone confirm if this issue with android O has been fixed yet?
Fixed with 1.2.1 version from PR #40
There was a mistake in 1.2.1, try it now with 1.2.2, please
Here is the crash log from Android O beta :- It crashes when you are trying to show the picker
android.os.FileUriExposedException: file:///storage/emulated/0/Android/data/com.sample.picker/cache/tempImage exposed beyond app through ClipData.Item.getUri() at android.os.StrictMode.onFileUriExposed(StrictMode.java:1932) at android.net.Uri.checkFileUriExposed(Uri.java:2348) at android.content.ClipData.prepareToLeaveProcess(ClipData.java:935) at android.content.Intent.prepareToLeaveProcess(Intent.java:9718) at android.content.Intent.prepareToLeaveProcess(Intent.java:9724) at android.content.Intent.prepareToLeaveProcess(Intent.java:9703) at android.app.Instrumentation.execStartActivity(Instrumentation.java:1609) at android.app.Activity.startActivityForResult(Activity.java:4462) at android.support.v4.app.BaseFragmentActivityJB.startActivityForResult(BaseFragmentActivityJB.java:50) at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:79) at android.app.Activity.startActivityForResult(Activity.java:4420) at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:859) at com.mvc.imagepicker.ImagePicker.pickImage(ImagePicker.java:92)