Package-level declarations

Properties

Link copied to clipboard
Link copied to clipboard

Checks if external storage is available to at least read

Link copied to clipboard

Checks if external storage is available for read and write

Link copied to clipboard

Checks if Environment.MEDIA_MOUNTED is returned by getExternalStorageState() and therefore external storage is read- and writable.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val takeFlags: Int

Functions

Link copied to clipboard

Take flags

Link copied to clipboard

Called after receiving the uri in onActivityResult when called by createFile

Link copied to clipboard
fun Activity.createFile(mimeType: String, fileNameAndExtension: String, WRITE_REQUEST_CODE: Int, onCantHandleAction: () -> Unit = {})
Link copied to clipboard

If you have the URI for a document and the document's Document.COLUMN_FLAGS contains SUPPORTS_DELETE

Link copied to clipboard
fun Context.dumpImageMetaData(uri: Uri, callback: (size: String?, name: String?) -> Unit)

REturns the size if it's known in bytes otherwise "Unknown" and the name

Link copied to clipboard
Link copied to clipboard
fun Context.getDocumentNameAndSizeForUri(documentUri: Uri, callback: (size: String?, name: String?) -> Unit = { _, _ -> })

Returns the file size in bytes and the file name

Link copied to clipboard

Reads the contents of virtual file, check if it's virtual file first use isVirtualFile

Link copied to clipboard

Checks if file is virtual, from Google drive etc... use getInputStreamForVirtualFile to read its contents

Link copied to clipboard
fun Activity.openDirectory(requestCode: Int, text: String = "Open directory with...", onCantHandleAction: () -> Unit = {})
Link copied to clipboard
fun Activity.openDocument(requestCode: Int, text: String = "Open document with...", onCantHandleAction: () -> Unit = {})
Link copied to clipboard
fun Activity.openImage(requestCode: Int, text: String = "Open image with...", onCantHandleAction: () -> Unit = {})
Link copied to clipboard
fun Activity.openVideo(requestCode: Int, text: String = "Open video with...", onCantHandleAction: () -> Unit = {})
Link copied to clipboard
fun Activity.pickImage(PICK_PHOTO_REQUEST_CODE: Int, text: String = "Pick image with...", onCantHandleAction: () -> Unit = {})
Link copied to clipboard
fun Activity.pickMultipleImages(requestCode: Int, text: String = "Pick images with...", onCantHandleAction: () -> Unit = {})
Link copied to clipboard
fun Activity.pickPDF(PICK_PDF_CODE: Int, text: String = "Pick pdf with...", onCantHandleAction: () -> Unit = {})
Link copied to clipboard
fun Activity.pickVideo(PICK_VIDEO_REQUEST_CODE: Int, text: String = "Open video with...", onCantHandleAction: () -> Unit = {})
Link copied to clipboard
fun Context.readTextFromUri(uri: Uri, onLineRead: (line: String) -> Unit = {}): String
Link copied to clipboard

Sets the uri for read permission flags

Link copied to clipboard

Sets the uri for read/write permission flags

Link copied to clipboard

Sets the uri for write permission flags