Buy Me a Coffee at Get it on Google Play


This is an Android project. It shows a DialogFragment with Camera or Gallery options. The user can choose from which provider wants to pick an image.

JitPack Android Arsenal MaterialUp Hits

Dialog screenshots

Default icons.

Colored icons.

Custom dialog.

System dialog. Demo Codacy Badge API


Step #1. Add the JitPack repository to your build file:

allprojects {
    repositories {
    maven { url "" }

Step #2. Add the dependency (See latest release).

dependencies {
    implementation 'com.github.jrvansuita:PickImage:+'


Step #1. Overriding the library file provider authority to avoid installation conflicts.

The use of this library can cause INSTALL_FAILED_CONFLICTING_PROVIDER if you skip this step. Update your AndroidManifest.xml with this exact provider declaration below.

<manifest ...>
    <application ...>
                android:resource="@xml/picker_provider_paths" />

Step #2 - Showing the dialog. PickSetup()).show(this);

Step #3 - Applying the listeners.

Method #3.1 - Make your AppCompatActivity implements IPickResult.
public void onPickResult(PickResult r) {
    if (r.getError() == null) {
        //If you want the Uri.
        //Mandatory to refresh image from Uri.

        //Setting the real returned image.

        //If you want the Bitmap.

        //Image path
    } else {
        //Handle possible errors
        //TODO: do what you have to do with r.getError();
        Toast.makeText(this, r.getError().getMessage(), Toast.LENGTH_LONG).show();
Method #3.2 - Set the listener using the public method (Good for Fragments). PickSetup())
               .setOnPickResult(new IPickResult() {
                  public void onPickResult(PickResult r) {
                     //TODO: do what you have to...
           .setOnPickCancel(new IPickCancel() {
          public void onCancelClick() {
            //TODO: do what you have to if user clicked cancel

Step #4 - Customize you Dialog using PickSetup.

PickSetup setup = new PickSetup()
            .setPickTypes(EPickType.GALLERY, EPickType.CAMERA)
/*... and more to come. */


Own click implementations.

If you want to write your own button click event, just use IPickClick listener like in the example below. You may want to take a look at the sample app.
        .setOnClick(new IPickClick() {
            public void onGalleryClick() {
                Toast.makeText(SampleActivity.this, "Gallery Click!", Toast.LENGTH_LONG).show();

            public void onCameraClick() {
                Toast.makeText(SampleActivity.this, "Camera Click!", Toast.LENGTH_LONG).show();

For dismissing the dialog.

PickImageDialog dialog =;

Force a specific width and height.

new PickSetup().setWidth(600).setHeight(800);

Not just an ImagePicker anymore! You can pick video too.

You can tell the setup to pick video instead of photo! (default option if you don't mention is to pick Image)

new PickSetup().setVideo(true);

Sample app code.

You can take a look at the sample app located on this project.

Google+ LinkedIn Instagram Github Google Play Store E-mail


Shows a DialogFragment with camera and gallery options. User can choose wich provider wants to pick images from. ๐Ÿ“ธ ๐Ÿ–ผ๏ธ

Pickimage Info

โญ Stars 428
๐Ÿ”— Source Code
๐Ÿ•’ Last Update 4 months ago
๐Ÿ•’ Created 6 years ago
๐Ÿž Open Issues 49
โž— Star-Issue Ratio 9
๐Ÿ˜Ž Author jrvansuita