Mindinventory / Lassi-Android

All in 1 picker library for android.
https://www.mindinventory.com/android-application-development.php
MIT License
198 stars 49 forks source link
android android-library android11-support audio camera crop document easy-to-use file-picker image images kotlin lassi media-picker mediapicker photo picker video videos

Lassi

Lassi is simplest way to pick media (either image, video, audio or doc)

Lassi Media picker

image       image

Key features

Usage

Dependencies

Implementation

            val intent = Lassi(this)
                .setMediaType(MediaType.FILE_TYPE_WITH_SYSTEM_VIEW)
                .setSupportedFileTypes(
                "jpg", "jpeg", "png", "webp", "gif", "mp4", "mkv", "webm", "avi", "flv", "3gp",
                "pdf", "odt", "doc", "docs", "docx", "txt", "ppt", "pptx", "rtf", "xlsx", "xls"
                )  // Filter by required media format (Mandatory)
                .build()
            receiveData.launch(intent)

Way of utilizing Photo Picker

        val intent = Lassi(this)
                .with(LassiOption.CAMERA_AND_GALLERY)
                .setMediaType(MediaType.PHOTO_PICKER)
                .setMaxCount(4)
                .setStatusBarColor(R.color.colorPrimaryDark)
                .setToolbarColor(R.color.colorPrimary)
                .setToolbarResourceColor(android.R.color.white)
                .setProgressBarColor(R.color.colorAccent)
                .setGalleryBackgroundColor(R.color.colorGrey)
                .setCustomLimitExceedingErrorMessage("Selected item exceeded the limit!")
                .build()

Document access permission note

If Android device SDK is >= 30 and wants to access document (only for choose the non media file) then add android.permission.MANAGE_EXTERNAL_STORAGE permission in your app otherwise library won't allow to access documents. Kindly check sample app for more detail. If you don't want to give Manage External Storage permission and wants to get files with system default view then You can use OR option from Step 1 and give required file type of document.

MediaType.FILE_TYPE_WITH_SYSTEM_VIEW (for System Default View)

Using this MediaType you can choose multiple files from system default view. You can't set max count limit for file choose. Give file type into setSupportedFileTypes and you can choose only those types of file from system view.

Guideline for contributors

Contribution towards our repository is always welcome, we request contributors to create a pull request to the develop branch only.

Guideline to report an issue/feature request

It would be great for us if the reporter can share the below things to understand the root cause of the issue.

Requirements

Library used

ProGaurd rules

-dontwarn com.bumptech.glide.**

LICENSE!

Lassi is MIT-licensed.

Let us know!

We’d be really happy if you send us links to your projects where you use our component. Just send an email to sales@mindinventory.com And do let us know if you have any questions or suggestion regarding our work.

app development