SimpleStorage
SimpleStorage copied to clipboard
setOnFileSelected is not executed
Library version: 1.5.6 and 2.0.0 OS version: Android 10,14 and other Device model: Pixel 4, Samsung Galaxy A22
After updating to 1.5.6+ versions, SimpleStorageHelper.setOnFileSelected method doesn't executed, other methods like setOnFileCreated and setOnFolderSelected work
this is the code example:
public SafDialog(AppCompatActivity context, SimpleStorageHelper storageHelper) {
this.context = new WeakReference<>(context);
this.storageHelper = storageHelper;
this.storageHelper.setOnFileCreated((requestCode, file) -> {
if (fileDialogListener == null && fileNameDialogListener == null) {
return null;
}
handleSafAction(file.getUri());
return null;
});
this.storageHelper.setOnFileSelected((requestCode, files) -> {
if (fileDialogListener == null && fileNameDialogListener == null) {
return null;
}
handleSafAction(files.get(0).getUri());
return null;
});
this.storageHelper.setOnFolderSelected((requestCode, folder) -> {
if (fileDialogListener == null && fileNameDialogListener == null) {
return null;
}
handleSafAction(folder.getUri());
return null;
});
}