FilePickerProvider

class FilePickerProvider(context: Context, permissionRequester: PermissionRequester, factoryCompressor: MultimediaCompressorFactory, activityProvider: ActivityProvider)

Parameters

context

Context, context of application

defaultCompress

default compress, compress will be used if user didn't choose compress

See also

https://developer.android.com/about/versions/13/features/photopicker

Constructors

Link copied to clipboard
constructor(context: Context, permissionRequester: PermissionRequester, factoryCompressor: MultimediaCompressorFactory, activityProvider: ActivityProvider)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Allow user getting one image captured from camera and compress it Moreover, if app has no permission to capture from camera, it will ask user to grant permission

Link copied to clipboard
suspend fun getMultipleFiles(vararg mimeTypes: String, permissions: List<PermissionsType> = listOf()): List<PickerResponse>

Function get multiple files and return list of Uris

Link copied to clipboard
suspend fun getMultipleImages(maxNumberPhotos: Int): List<PickerResponse>

Allow user getting multiple images from gallery and compress Moreover, if app has no permission to access gallery, it will ask user to grant permission

Link copied to clipboard

Allow user getting multiple videos from gallery and compress Moreover, if app has no permission to access gallery, it will ask user to grant permission

Link copied to clipboard
suspend fun getOneFile(vararg mimeTypes: String, permissions: List<PermissionsType> = listOf()): PickerResponse?

Function get one file and return Uri

Link copied to clipboard
suspend fun getOneImage(): PickerResponse?

Allow user getting one imaged from gallery and compress it with the information of saved in the instance class Moreover, if app has no permission to access gallery, it will ask user to grant permission

Link copied to clipboard
suspend fun getOneVideo(): PickerResponse?

Allow user getting one video from gallery and compress Moreover, if app has no permission to access gallery, it will ask user to grant permission

Link copied to clipboard

Allow user getting one image captured from camera and compress it with the information of saved in the instance class Moreover, if app has no permission to capture from camera, it will ask user to grant permission

Link copied to clipboard