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
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
The method getCaptureImageOutputUri() use Uri.fromFile