ImagePicker camera and gallery


#1

Hi,

I would like to know if there’s a way to get the camera AND the image gallery in the same function call, something like ‘react-native-image-picker’ does.

The thing is that I would rather solve this using just expo than installing a new module that does almost the exact same thing.

So far, by using the ImagePicker, I am being able to load the camera or the picture gallery, but I need to show the user the option to use one or the other.

Thanks,
Gonzalo.


#2

You could build this pretty easily using https://docs.expo.io/versions/latest/sdk/imagepicker#__next

which has both of those abilities.


#3

That’s what I’m trying to do but with

Expo.ImagePicker.launchImageLibraryAsync(options)

I can only see the image gallery and with

Expo.ImagePicker.launchCameraAsync(options)

I can only see the camera, I can’t find a way to have them both at once.


#4

oh – yeah, you’d need to make an sheet with two options that would let the user choose. that shouldn’t be too hard though.