package com.miguelgaeta.media_picker;

/**
 * Created by Miguel Gaeta on 2/11/16.
 */
public enum MediaPickerRequest {

    REQUEST_CAPTURE,
    REQUEST_GALLERY,
    REQUEST_DOCUMENTS,
    REQUEST_CROP;

    /**
     * Internally get the associated request code to used in
     * the activity intent system.
     *
     * @return Unique request code for each operation.
     */
    int getCode() {

        switch (this) {

            case REQUEST_CAPTURE:

                return 777;

            case REQUEST_GALLERY:

                return 778;

            case REQUEST_DOCUMENTS:

                return 779;

            case REQUEST_CROP:

                return 800;
        }

        return -1;
    }

    /**
     * Convert request code integer back into a user
     * friendly enum.
     *
     * @param code Request code integer.
     *
     * @return Request enum.
     */
    static MediaPickerRequest create(int code) {

        switch (code) {

            case 777:

                return REQUEST_CAPTURE;

            case 778:

                return REQUEST_GALLERY;

            case 779:

                return REQUEST_DOCUMENTS;

            case 800:

                return REQUEST_CROP;
        }

        return null;
    }
}

@@ -194,18 +194,39 @@
 EST_CROP
+,%0A    REQUEST_CHOOSER
 ;%0A
-
 %0A    /**
@@ -691,16 +691,80 @@
 urn 800;
+%0A%0A            case REQUEST_CHOOSER:%0A%0A                return 801;
 %0A       
@@ -1260,16 +1260,16 @@
 e 800:%0A%0A
-
         
@@ -1296,16 +1296,80 @@
 ST_CROP;
+%0A%0A            case 801:%0A%0A                return REQUEST_CHOOSER;
 %0A       

Add chooser request type.