This is a work in progress Android library made with kotlin for anyone that wants an easy-to-implement and ready-to-use media picker.
On your project's gradle file add
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
On your module's gradle file add
dependencies {
implementation 'com.github.leonardodlana:media-picker:0.0.1'
}
MediaPickerAlbumActivity.Companion.launch({Activity}, {onlyPictures?}, {YOUR_REQUEST_CODE});
MediaPickerAlbumActivity.launch({Activity}, {onlyPictures?}, {YOUR_REQUEST_CODE})
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
if (requestCode == REQUEST_CODE && resultCode == RESULT_OK) {
val selectedItems = data?.getParcelableArrayListExtra<MediaItem>(MediaPickerAlbumActivity.KEY_DATA)
}
}
README will be updated as soon as the project is updated