jaydeepw / poly-picker

Android library project for providing multiple image selection from the device.
406 stars 114 forks source link

Use only camera #63

Open iurimenin opened 9 years ago

iurimenin commented 9 years ago

Hello, there's any configuration to use only camera? Or validate if the images is from the camera or gallery ?

jaydeepw commented 9 years ago

Not right now but its in feature requests.

iurimenin commented 9 years ago

It`s anyone working on it ?

jaydeepw commented 9 years ago

Not at the moment :/

iurimenin commented 9 years ago

Me and my friend will try to do this then :)

AbhisheKundalia commented 7 years ago

In order to use only Camera, You can use the following Intent to directly access image from the camera:

`Intent intents = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

            fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);

            intents.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);

            // start the image capture Intent
            startActivityForResult(intents, TAKE_PICTURE);`

and then capture the image on ActivityResult method as: `@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data);

switch (requestCode) {
case TAKE_PICTURE:
    if (resultCode == RESULT_OK) {

        previewCapturedImage();

    }

    break;
}

} `

Hope this helps! I know its too late... might help someone