ivpusic / react-native-image-crop-picker

iOS/Android image picker with support for camera, video, configurable compression, multiple images and cropping
MIT License
6.12k stars 1.56k forks source link

on android multiple images are not selecting , on ios its working #1309

Open riazali-tech opened 4 years ago

riazali-tech commented 4 years ago

handlePickImage = async () => { try {

        console.log('hit')
        const images = await ImagePicker.openPicker({
            width: 1000,
            height: 1000,
            cropping: true,
            multiple: true,
            compressImageQuality: 0.5,

        })
        console.log(images)

        for (const image of images) {
            const path = image.path.split('/');
            const fileName = path[path.length - 1]
            console.log('fileNameforVideo', fileName)
            this.setState(
                {
                    files: [... this.state.files, { url: '', type: image.mime.split('/')[0], path: image.path }],
                    file: image.path,
                    fileName,
                    filetype: image.mime.split('/')[0],
                    mimeType: image.mime
                })

            await this.getSingedUrl();
        }

    } catch (error) {

        console.log(error)
        console.log('lol')
    }
marcmoo commented 4 years ago

it looks like multiple images deprecated on android part, only works on ios?

huurray commented 4 years ago

same situation! only pick one picture even if i set multiple props.

brendan1809 commented 4 years ago

For android, holding one of the image will automatically able to select multiple image and videos

alex1blackhole commented 4 years ago

same thing

nmanikumar5 commented 4 years ago

Can anyone confirm I can able to choose multiple images from recent images but whenever I tried by click on gallery, I can't able to choose multiple.

Can anyone tell me solution please

anhtuank7c commented 4 years ago

I start a new Activity from native Android which already override onActivityResult and forgot to call super.onActivityResult. So I fixed it in my own activity, now I able to pick multiple files on Android. Hope it helps.

gonghong commented 4 years ago

I start a new Activity from native Android which already override onActivityResult and forgot to call super.onActivityResult. So I fixed it in my own activity, now I able to pick multiple files on Android. Hope it helps.

Can you tell me how to do it? thanks!

SDE-Arvind commented 4 years ago

if Recent images are open I am able to select multiple images in android but if I open album than multiple selection not worked

hengkx commented 4 years ago

how to resolve?

hzburki commented 4 years ago

It seems to work but you have to long press the images on Android to select multiple.

anhtuank7c commented 4 years ago

It seems to work but you have to long press the images on Android to select multiple.

Sure. You have to long press on an image, then you will able to select multiple images

alexsoul95 commented 4 years ago

if Recent images are open I am able to select multiple images in android but if I open album than multiple selection not worked

same here, from recents multiple works but outside not working... any solutions so far?

SDE-Arvind commented 3 years ago

I have changed the library and used https://github.com/AnilFurkanOkcun/UWMediaPicker-Android for image selection in android https://github.com/ar0692/react-native-image-crop-picker

for more help regarding image picker and video compression for android reachout to me on https://www.mobileexperthelp.com/