Simple Media Picking Library for Android
Call the Picka library from the activity/fragment picking a media file by default it seeks Image files and no defined mime types.
//With Defaults
Picka.pickMedia(this)
//With Params
Picka.pickMedia(this, MediaType.IMAGE, arrayOf("image/jpeg", "image/png"))
The Result can then be retrieved from onActivityResult
as shown
val uri = Picka.collectMediaFile(requestCode, resultCode, data)
MediaType.IMAGE
MediaType.VIDEO
Add jitpack to project level build.gradle
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
Then add the library to module level build.gradle.
implementation 'com.github.Davidodari:picka:$latest_release'
© David Odari 2019