Instagram like Image Picker for Android

Related tags

android-image-picker
Overview

ImagePicker

A simple Instagram like library to select images from the gallery and camera.

Screenshot

Usage

For full example, please refer to the sample app.

Add this to your project's build.gradle

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

And add this to your module's build.gradle

dependencies {
    implementation 'com.github.akvelon.android-image-picker:imagepicker:x.y.z'
    // If you have a problem with Glide, please use the same Glide version or simply open an issue
    implementation 'com.github.bumptech.glide:glide:4.11.0’
}

change x.y.z to version in the release page

Start image picker activity

The simplest way to start

ImagePicker.launch(this); // Activity or Fragment

If you already have selected images

ImagePicker.launchWithPreselectedImages(
this, // Activity or Fragment
 alreadySelectedImages // list of already selected files
);

Receive result

  @Override
    protected void onActivityResult(int requestCode, final int resultCode, Intent data) {
        if (ImagePicker.shouldResolve(requestCode, resultCode)) {
            // Get a list of picked images
            List<File> images = ImagePicker.getImages(data);
            // or get a single image only
            File image = ImagePicker.getSingleImageOrNull(data);
        }
        super.onActivityResult(requestCode, resultCode, data);
    }

AndroidX

As version 1.0.0 above, we already use AndroidX artifact in our library. If you have any trouble adding this version to your current project, please add this to your gradle.properties :

android.useAndroidX=true
android.enableJetifier=true

Or simply create an issue

Issues
  • Better use drawable selector

    Better use drawable selector

    https://github.com/akvelon/android-image-picker/blob/cd3071c2edc141d16264f13593422b911e56a213/imagepicker/src/main/java/com/akvelon/imagepicker/PickerActivity.kt#L37-L38

    It's probably better to use one selector drawable instead of multiple drawables with logic in code

    opened by satorikomeiji 1
  • Diff utils would be helpful here

    Diff utils would be helpful here

    https://github.com/akvelon/android-image-picker/blob/cd3071c2edc141d16264f13593422b911e56a213/imagepicker/src/main/java/com/akvelon/imagepicker/PickerActivity.kt#L118

    This code redraws the whole adapter even though some items may be intact

    opened by satorikomeiji 1
  • Adapter is recreated on refresh

    Adapter is recreated on refresh

    https://github.com/akvelon/android-image-picker/blob/cd3071c2edc141d16264f13593422b911e56a213/imagepicker/src/main/java/com/akvelon/imagepicker/PickerActivity.kt#L184

    Adapter should be created on init

    opened by satorikomeiji 1
  • Media store db is queried on the main thread

    Media store db is queried on the main thread

    https://github.com/akvelon/android-image-picker/blob/cd3071c2edc141d16264f13593422b911e56a213/imagepicker/src/main/java/com/akvelon/imagepicker/PickerActivity.kt#L148

    Better put this in background thread to avoid ui freezes

    opened by satorikomeiji 1
Releases(1.0.1)
Owner
Akvelon
Open source, from Akvelon
Akvelon
Image Picker library for Android

Ronnie-Image-Picker Asks for Camera and storage permission and return uri of the images taken or picked from the gallery. Min Api Level: 16 Build Syst

Ronnie Otieno 16 Sep 9, 2021
Android library to choose image from gallery or camera with option to compress result image

ImagePicker Android library to choose image from gallery or camera with option to compress result image. Download Add this to your project's build.gra

Mayank Nagwanshi 63 Sep 6, 2021
Camera Folder: "Take a Photo from Camera" everywhere where you can open a photo file

When "Camera Folder" is installed many Android-Apps that can open jpg files can also take a photo from camera.

k3b 7 Sep 14, 2021
A library to take picture easy, transform your data in different format and save photos in your device

A Magic library to take photos and select pictures in Android. In a simple way and if you need it also save the pictures in device, and facial recogni

Fabian Rosales (Frosquivel Developer) 329 Sep 5, 2021
📸 Use Android camera to take pictures and videos, based on `camera2` api.

Camera Use Android camera to take pictures and videos, based on camera2 api. Features Auto filled CameraView for previewing Support both image capture

Hong Duan 112 Aug 15, 2021
Quick photo and video camera with a flash, customizable resolution and no ads.

Simple Camera A camera with flash, zoom and no ads. The camera is usable for both photo taking and video recording. You can switch between front and r

Simple Mobile Tools 552 Sep 18, 2021
📸 A library that allows you to capture images secretly, in background without alerting users.

HiddenCamera A library that allows you to capture images secretly, in background without alerting users. Gradle Dependency Add the dependency to your

Cotta & Cush Limited 105 Sep 18, 2021
Measures human heart rate using camera and flash light.

Heart-Rate-Ometer Introduction Measures human heart rate using camera and flash light. How-it-works https://github.com/phishman3579/android-heart-rate

Jan Rabe 78 Jul 29, 2021
Powerful custom Android Camera with granular control over the video quality and filesize, restricting recordings to landscape only.

LandscapeVideoCamera Highly flexible Android Camera which offers granular control over the video quality and filesize, while restricting recordings to

Jeroen Mols 1.2k Sep 12, 2021
Wrapper around the android Camera class that simplifies its usage

EasyCamera Wrapper around the android Camera class that simplifies its usage (read more about the process) Usage: // the surface where the preview wil

Bozhidar Bozhanov 646 Aug 3, 2021