ArthurHub / ArthurHub/Android-Image-Cropper

FileUriExposedException:

Open
#659 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
6.4k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

I have this error..
Caused by: android.os.FileUriExposedException: file:///storage/emulated/0/Android/data/com.soin.TSA/cache/pickImageResult.jpeg exposed beyond app through ClipData.Item.getUri()

Looks like this happens on Android N

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
imageUri = Uri.parse(filepath);
} else{
imageUri = Uri.fromFile(new File(filepath));
}

The method getCaptureImageOutputUri() use Uri.fromFile

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.