All Projects → Mindinventory → Lassi-Android

Mindinventory / Lassi-Android

Licence: MIT license
All in 1 picker library for android.

Programming Languages

java
68154 projects - #9 most used programming language
kotlin
9241 projects

Projects that are alternatives of or similar to Lassi-Android

Contentmanager
Android library for getting photo or video from a device gallery, cloud or camera. Working with samsung devices. Made by Stfalcon
Stars: ✭ 108 (+0%)
Mutual labels:  camera, images, picker, videos
android-pickpic
Ready to use library that allows people to select pictures from their device and Facebook account.
Stars: ✭ 12 (-88.89%)
Mutual labels:  camera, images, picker
Ypimagepicker
📸 Instagram-like image picker & filters for iOS
Stars: ✭ 3,661 (+3289.81%)
Mutual labels:  camera, picker, photo
Exiftool Vendored.js
Fast, cross-platform Node.js access to ExifTool
Stars: ✭ 200 (+85.19%)
Mutual labels:  images, videos, photo
Rxpaparazzo
RxJava extension for Android to take images using camera and gallery and pick files up
Stars: ✭ 467 (+332.41%)
Mutual labels:  camera, crop, picker
Hybridcamera
Video and photo camera for iOS
Stars: ✭ 145 (+34.26%)
Mutual labels:  camera, photo
Croperino
📷 A simple image cropping tool that provides gallery or camera help for Native Android (Java)
Stars: ✭ 176 (+62.96%)
Mutual labels:  camera, crop
Pixelsdk
The modern photo and video editor for your iPhone / iPad app. A fully customizable image & video editing iOS Swift framework.
Stars: ✭ 192 (+77.78%)
Mutual labels:  camera, crop
ytmous
Anonymous Youtube Proxy
Stars: ✭ 60 (-44.44%)
Mutual labels:  videos, easy-to-use
Flutter wechat camera picker
A camera picker in WeChat style.
Stars: ✭ 95 (-12.04%)
Mutual labels:  camera, picker
photos
"Fx Fotos" is an opensource gallery app in react native with the same smoothness and features of Google Photos and Apple Photos. It is backend gnostic and connects to decentralized backends like "box", "Dfinity", "Filecoin" and "Crust".
Stars: ✭ 620 (+474.07%)
Mutual labels:  videos, photo
cloudinary-api
Shorter and lighter APIs for Cloudinary
Stars: ✭ 41 (-62.04%)
Mutual labels:  images, videos
Pictureselector
Picture Selector Library for Android or 图片选择器
Stars: ✭ 11,095 (+10173.15%)
Mutual labels:  camera, photo
Os Fileup
Helper app to understand how to upload files and do basic image/video processing in hybrid android apps.
Stars: ✭ 190 (+75.93%)
Mutual labels:  camera, photo
Publishcommunity Master
仿微博,QQ空间,论坛 ,九宫格图文混排发表说说,动态,帖子
Stars: ✭ 107 (-0.93%)
Mutual labels:  camera, photo
MediaSliderView
Pure java based, highly customizable media slider gallery supporting both images and videos for android.
Stars: ✭ 85 (-21.3%)
Mutual labels:  images, videos
XGImagePickerController
iOS相册图片/视频选择器
Stars: ✭ 32 (-70.37%)
Mutual labels:  camera, picker
MLDPhotoManager
弹出AlertController让用户选择相机还是相册.基于@gang544043963大神的LGPhotoBrowser项目再次封装
Stars: ✭ 19 (-82.41%)
Mutual labels:  picker, photo
android-doc-picker
A simple and easy to use documents Picker android library. Choose any documents like pdf, ppt, text, word or media files from your device
Stars: ✭ 37 (-65.74%)
Mutual labels:  images, videos
minavdrawer
Easy to add different animations into standard NavigationDrawer.
Stars: ✭ 93 (-13.89%)
Mutual labels:  easy-to-use, android11-support

Lassi

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

Lassi Media picker

image       image

Key features

  • Android 12 support
  • Simple implementation
  • Set your own custom styles
  • Filter by particular media type
  • Filter videos by min and max time
  • Enable/disable camera from LassiOption
  • You can open System Default view for file selection by using MediaType.FILE_TYPE_WITH_SYSTEM_VIEW

Usage

Dependencies

  • Step 1. Add the JitPack repository in your project build.gradle:

        allprojects {
    	    repositories {
    		    ...
    		    maven { url 'https://jitpack.io' }
    	    }
        }

    or

    If Android studio version is Arctic Fox then add it in your settings.gradle:

       dependencyResolutionManagement {
    		repositories {
        		...
        		maven { url 'https://jitpack.io' }
    		}
       }
  • Step 2. Add the dependency in your app module build.gradle:

        dependencies {
            ...
            implementation 'com.github.Mindinventory:Lassi:X.X.X'
        }

Implementation

  • Step 1. To open a app color theme view then add Lassi in to your activity class:

            val intent = Lassi(this)
                .with(LassiOption.CAMERA_AND_GALLERY) // choose Option CAMERA or CAMERA_AND_GALLERY
                .setMaxCount(5)
                .setGridSize(3)
                .setMediaType(MediaType.VIDEO) // MediaType : VIDEO IMAGE, AUDIO OR DOC
                .setCompressionRation(10) // compress image for single item selection (can be 0 to 100)
                .setMinTime(15) // for MediaType.VIDEO only
                .setMaxTime(30) // for MediaType.VIDEO only
                .setSupportedFileTypes("mp4", "mkv", "webm", "avi", "flv", "3gp") // Filter by limited media format (Optional)
                .setMinFileSize(100) // Restrict by minimum file size 
                .setMaxFileSize(1024) //  Restrict by maximum file size
                .disableCrop() // to remove crop from the single image selection (crop is enabled by default for single image)
                /*
                 * Configuration for  UI
                 */
                .setStatusBarColor(R.color.colorPrimaryDark)
                .setToolbarResourceColor(R.color.colorPrimary)
                .setProgressBarColor(R.color.colorAccent)
                .setPlaceHolder(R.drawable.ic_image_placeholder)
                .setErrorDrawable(R.drawable.ic_image_placeholder)
                .setSelectionDrawable(R.drawable.ic_checked_media)
                .setCropType(CropImageView.CropShape.RECTANGLE) // choose shape for cropping after capturing an image from camera (for MediaType.IMAGE only)
                .setCropAspectRatio(1, 1) // define crop aspect ratio for cropping after capturing an image from camera (for MediaType.IMAGE only)
                .enableFlip() // Enable flip image option while image cropping (for MediaType.IMAGE only)
                .enableRotate() // Enable rotate image option while image cropping (for MediaType.IMAGE only)
                .enableActualCircleCrop() // Enable actual circular crop (only for MediaType.Image and CropImageView.CropShape.OVAL)
                .build()
             receiveData.launch(intent)

OR To open a system default view then add Lassi in to your activity class:

            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)
  • Step 2. Get Lassi result in ActivityResultCallback lambda function.

        private val receiveData =
                registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
                    if (it.resultCode == Activity.RESULT_OK) {
                        val selectedMedia =
                            it.data?.getSerializableExtra(KeyUtils.SELECTED_MEDIA) as ArrayList<MiMedia>
                        if (!selectedMedia.isNullOrEmpty()) {
                            ivEmpty.isVisible = selectedMedia.isEmpty()
                            selectedMediaAdapter.setList(selectedMedia)
                        }
                    }
                }

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.

  • Library version
  • Code snippet
  • Logs if applicable
  • Device specification like (Manufacturer, OS version, etc)
  • Screenshot/video with steps to reproduce the issue

Requirements

  • minSdkVersion >= 19
  • Androidx

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 [email protected] And do let us know if you have any questions or suggestion regarding our work.

app development
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].