File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
java/ir/smartdevelopers/smartfilebrowser/customClasses Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ android {
3131 }
3232}
3333group = ' ir.smartdevelopers'
34- version = ' 1.2.6 '
34+ version = ' 1.2.7 '
3535task sourcesJar (type : Jar ) {
3636 archiveClassifier. set(" sources" )
3737 from android. sourceSets. main. java. srcDirs
Original file line number Diff line number Diff line change 2222 android : theme =" @style/sfb_EditorTheme"
2323 tools : replace =" android:label" />
2424 <provider
25- android : authorities =" ${applicationId}.provider "
25+ android : authorities =" ${applicationId}.sfb_provider "
2626 android : name =" .customClasses.SmartFileProvider"
2727 android : exported =" false"
2828 android : grantUriPermissions =" true" >
Original file line number Diff line number Diff line change 33import android .content .Context ;
44import android .content .Intent ;
55import android .graphics .drawable .StateListDrawable ;
6+ import android .net .Uri ;
67import android .os .Bundle ;
78
89import androidx .annotation .Nullable ;
10+ import androidx .core .content .FileProvider ;
911
1012import java .io .File ;
1113import java .util .Collections ;
@@ -110,4 +112,17 @@ public static File[] getResult(Intent data){
110112 return null ;
111113
112114 }
115+ @ Nullable
116+ public static Uri [] getResultUris (Context context ,Intent data ){
117+ File [] files =getResult (data );
118+ if (files ==null ){
119+ return null ;
120+ }
121+ Uri [] result =new Uri [files .length ];
122+ for (int i =0 ;i <files .length ;i ++){
123+ result [i ]= FileProvider .getUriForFile (context ,
124+ context .getPackageName ()+".sfb_provider" ,files [i ]);
125+ }
126+ return result ;
127+ }
113128}
You can’t perform that action at this time.
0 commit comments