Permission Denial: Writing Android.support.v4.content.fileprovider Uri
Good day.I have an weird issue to which none of examples in stack overflow has worked.I am opening an gallery,after which i am redirecting user to crop intent.Important to mention
Solution 1:
List<ResolveInfo> resInfoList = getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
for (ResolveInfo resolveInfo : resInfoList) {
StringpackageName= resolveInfo.activityInfo.packageName;
grantUriPermission(packageName, photoURI, Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);
}
Solution 2:
First, Android does not have a CROPIntent. There are many image cropping libraries available for Android. Use one.
Second, the first parameter to grantUriPermissions() is not an action string or some random series of characters. It is an application ID (a.k.a., package name). com.android.camera.action.CROP is not a package name.
Post a Comment for "Permission Denial: Writing Android.support.v4.content.fileprovider Uri"