Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java.lang.SecurityException: Permission Denial: reading androidx.core.content.FileProvider

List<ResolveInfo> resInfoList = context.getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
for (ResolveInfo resolveInfo : resInfoList) {
    String packageName = resolveInfo.activityInfo.packageName;
    context.grantUriPermission(packageName, uri, Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);
}
Comment

PREVIOUS NEXT
Code Example
Java :: how to add data into list model in android 
Java :: what is static method in oop 
Java :: JFrame change outline 
Java :: how to code java??????????? 
Java :: math square java 
Java :: date java use fix timezone 
Java :: arraylist in java 
Java :: java exponencial 
Java :: java set font 
Java :: csv compare 
Java :: Bukkit plugin player variable 
Java :: jframe calculator 
Java :: display 2d array 
Java :: java linkedlist poll 
Java :: difference between synchronized block and synchronized method example 
Java :: Android listen to network change 
Java :: how to compare doubles in java 
Java :: 2-dimensional Array java 
Java :: get current location android 
Java :: string array to string stream java 
Java :: import image icon 
Java :: binary search algorithm java 
Java :: get value from Spring application.properties 
Java :: set decimal point in java 
Java :: Java Singleton Class Syntax 
Java :: how to get a set from a map in java 
Java :: class property java 
Java :: contain java 
Java :: java programming problems 
Java :: java meeting scheduler 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =