File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
AndroidFilePickerLightLibrary
src/main/java/com/maxieds/androidfilepickerlightlibrary Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ android {
3737 minSdkVersion 26
3838 targetSdkVersion 30
3939 compileSdkVersion 31
40- versionCode 21
41- versionName " 1.2.0 "
40+ versionCode 22
41+ versionName " 1.2.1 "
4242 buildToolsVersion " 30.0.1"
4343
4444 }
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ private boolean setLegacyBaseFolderByName(String namedSubFolder) {
167167 }
168168
169169 public boolean selectBaseDirectoryByType (FileChooserBuilder .BaseFolderPathType baseFolderType ) {
170- Context appCtx = FileChooserActivity .getInstance ();
170+ FileChooserActivity appCtx = FileChooserActivity .getInstance ();
171171 switch (baseFolderType ) {
172172 case BASE_PATH_TYPE_FILES_DIR :
173173 baseDirPath = appCtx .getFilesDir ();
@@ -201,7 +201,11 @@ public boolean selectBaseDirectoryByType(FileChooserBuilder.BaseFolderPathType b
201201 setLegacyBaseFolderByName ("Pictures" );
202202 break ;
203203 case BASE_PATH_TYPE_EXTERNAL_FILES_SCREENSHOTS :
204- baseDirPath = appCtx .getExternalFilesDir (Environment .DIRECTORY_SCREENSHOTS );
204+ if (android .os .Build .VERSION .SDK_INT >= Build .VERSION_CODES .Q ) {
205+ baseDirPath = appCtx .getExternalFilesDir (Environment .DIRECTORY_SCREENSHOTS );
206+ } else {
207+ baseDirPath = new File (appCtx .getFilesDir (), "Pictures/Screenshots" );
208+ }
205209 setLegacyBaseFolderByName ("Pictures/Screenshots" );
206210 break ;
207211 case BASE_PATH_TYPE_USER_DATA_DIR :
You can’t perform that action at this time.
0 commit comments