Media Picker is an Android Library that lets you to select multiple images, video for Android 4.4 (API 19) +.
Gradle
dependencies {
implementation 'com.github.thirdegg:media-picker:1.0.1-alpha'
}
After adding the library, you need to:
You will need to create a new instance of MediaPicker
. Once the instance are configured, you can call build()
.
MediaPicker.Builder(MainActivity.this)
.allowMultipleImages(false)
.enableDebuggingMode(true)
.setCallback { files->
//TODO
}
.build()
allowMultipleImages
Extra used to select and return multiple images from gallery CANNOT select single image from gallery if this feature was enabled
.allowMultipleImages(true)
allowOnlineImages
an option to allow the user to select any image from online resource ex: Google Drive (KNOWN ISSUE) if you enable this option then you cannot select multiple images
.allowOnlineImages(true)
library based on https://github.com/alhazmy13/MediaPicker