-
public final class SimpleStorageHelperHelper class to ease you using file & folder picker.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceSimpleStorageHelper.OnFileReceivedpublic classSimpleStorageHelper.Companion
-
Field Summary
Fields Modifier and Type Field Description private final SimpleStoragestorageprivate Function2<Integer, DocumentFile, Unit>onStorageAccessGrantedprivate Function2<Integer, DocumentFile, Unit>onFolderSelectedprivate Function2<Integer, List<DocumentFile>, Unit>onFileSelectedprivate Function2<Integer, DocumentFile, Unit>onFileCreatedprivate SimpleStorageHelper.OnFileReceivedonFileReceived
-
Constructor Summary
Constructors Constructor Description SimpleStorageHelper(Activity activity, Integer requestCodeForPermissionDialog, Bundle savedState)SimpleStorageHelper(Activity activity, Integer requestCodeForPermissionDialog)SimpleStorageHelper(ComponentActivity activity, Bundle savedState)SimpleStorageHelper(ComponentActivity activity)SimpleStorageHelper(Fragment fragment, Bundle savedState)SimpleStorageHelper(Fragment fragment)
-
Method Summary
-
-
Constructor Detail
-
SimpleStorageHelper
SimpleStorageHelper(Activity activity, Integer requestCodeForPermissionDialog, Bundle savedState)
-
SimpleStorageHelper
SimpleStorageHelper(ComponentActivity activity, Bundle savedState)
-
SimpleStorageHelper
SimpleStorageHelper(ComponentActivity activity)
-
SimpleStorageHelper
SimpleStorageHelper(Fragment fragment)
-
-
Method Detail
-
getStorage
final SimpleStorage getStorage()
-
getOnStorageAccessGranted
final Function2<Integer, DocumentFile, Unit> getOnStorageAccessGranted()
-
setOnStorageAccessGranted
final Unit setOnStorageAccessGranted(Function2<Integer, DocumentFile, Unit> onStorageAccessGranted)
-
getOnFolderSelected
final Function2<Integer, DocumentFile, Unit> getOnFolderSelected()
-
setOnFolderSelected
final Unit setOnFolderSelected(Function2<Integer, DocumentFile, Unit> onFolderSelected)
-
getOnFileSelected
final Function2<Integer, List<DocumentFile>, Unit> getOnFileSelected()
-
setOnFileSelected
final Unit setOnFileSelected(Function2<Integer, List<DocumentFile>, Unit> onFileSelected)
-
getOnFileCreated
final Function2<Integer, DocumentFile, Unit> getOnFileCreated()
-
setOnFileCreated
final Unit setOnFileCreated(Function2<Integer, DocumentFile, Unit> onFileCreated)
-
getOnFileReceived
final SimpleStorageHelper.OnFileReceived getOnFileReceived()
-
setOnFileReceived
final Unit setOnFileReceived(SimpleStorageHelper.OnFileReceived onFileReceived)
-
onRequestPermissionsResult
final Unit onRequestPermissionsResult(Integer requestCode, Array<String> permissions, IntArray grantResults)
Mandatory for Activity, but not for Fragment and ComponentActivity
-
openFolderPicker
@JvmOverloads() final Unit openFolderPicker(Integer requestCode, FileFullPath initialPath)
-
openFolderPicker
@JvmOverloads() final Unit openFolderPicker(Integer requestCode)
-
openFolderPicker
@JvmOverloads() final Unit openFolderPicker()
-
openFilePicker
@JvmOverloads() final Unit openFilePicker(Integer requestCode, Boolean allowMultiple, FileFullPath initialPath, String filterMimeTypes)
-
openFilePicker
@JvmOverloads() final Unit openFilePicker(Integer requestCode, Boolean allowMultiple, String filterMimeTypes)
-
openFilePicker
@JvmOverloads() final Unit openFilePicker(Integer requestCode, String filterMimeTypes)
-
openFilePicker
@JvmOverloads() final Unit openFilePicker(String filterMimeTypes)
-
requestStorageAccess
@RequiresApi(value = 21)@JvmOverloads() final Unit requestStorageAccess(Integer requestCode, FileFullPath initialPath, StorageType expectedStorageType, String expectedBasePath)
-
requestStorageAccess
@RequiresApi(value = 21)@JvmOverloads() final Unit requestStorageAccess(Integer requestCode, FileFullPath initialPath, StorageType expectedStorageType)
-
requestStorageAccess
@RequiresApi(value = 21)@JvmOverloads() final Unit requestStorageAccess(Integer requestCode, FileFullPath initialPath)
-
requestStorageAccess
@RequiresApi(value = 21)@JvmOverloads() final Unit requestStorageAccess(Integer requestCode)
-
requestStorageAccess
@RequiresApi(value = 21)@JvmOverloads() final Unit requestStorageAccess()
-
createFile
@JvmOverloads() final Unit createFile(String mimeType, String fileName, FileFullPath initialPath, Integer requestCode)
-
createFile
@JvmOverloads() final Unit createFile(String mimeType, String fileName, FileFullPath initialPath)
-
createFile
@JvmOverloads() final Unit createFile(String mimeType, String fileName)
-
createFile
@JvmOverloads() final Unit createFile(String mimeType)
-
onSaveInstanceState
final Unit onSaveInstanceState(Bundle outState)
-
onRestoreInstanceState
final Unit onRestoreInstanceState(Bundle savedInstanceState)
-
-
-
-