Skip to content

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.

License

Notifications You must be signed in to change notification settings

leonardodlana/media-picker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Media Picker

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.

Walkthrough video

Watch the video

Add the library to your app

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'
}

Usage

Java

MediaPickerAlbumActivity.Companion.launch({Activity}, {onlyPictures?}, {YOUR_REQUEST_CODE});

Kotlin

MediaPickerAlbumActivity.launch({Activity}, {onlyPictures?}, {YOUR_REQUEST_CODE})

Getting the result

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

About

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.

Resources

License

Stars

Watchers

Forks

Packages

No packages published