Allow ImagePicker to take multiple pictures
cloudmu
Also, after taking the picture, ImagePicker would pause and wait for end user to "accept" the picture by clicking on the checkmark button. It would be better to make the "accept" step optional. Developer can choose to skip the "accept" step when continuously taking pictures.
Michael Wood
cloudmu: Could you elaborate a bit more on what you're trying to do? It sounds to me like you're trying to make a camera app rather than something to just choose one or two images that you then e.g. upload to a server or something like that.
Maybe
expo-camera
or react-native-vision-camera
would work better for you than expo-image-picker
?EDIT: Sorry, I didn't see your other reply below.
Michael Wood
Isn't that what this is for?
cloudmu
Michael Wood: I am quite familiar with expo-camera, and I actually implemented a full fledged camera app using its API. However there are a few issues with expo-camera that makes it fall short. (These issues were also raised/documented by others on expo github and on stackoverflow).
1: Distorted camera preview on android. (stretched in landscape mode and squeezed in portrait mode on android).
2: When taking picture while holding the phone horizontally (while camera orientation itself is locked in portrait mode), the picture will be saved in portrait mode. This is a very subtle issue: the expo-camera behavior is different from native android camera app. Note the imagePicker behaves the same as native camera app.
3: expo-camera cannot zoom out as far as the native camera (using the zoom prop in its api). The imagePicker can zoom out as far as the native camera. This is the biggest deal breaker for expo-camera.
4: Overall the expo-camera "feels" slower. It's customizable using its API, which is great for certain use cases. However it also means all the common features have to be implemented through its API (flash, zoom, etc). For most use cases, the ImagePicker works well out of box: it has the same familiar native camera app look&feel, fast and reliable, and with most features built-in. It would be perfect if it can take multiple pictures, just like the native camera app.
Michael Wood
cloudmu: Sorry, I didn't see this response before sending you my other reply.
I see. Perhaps have a look at
react-native-vision-camera
. You might have more luck with that.cloudmu
Michael Wood: Thank you. Yes, react-native-vision-camera is the way to go for highly customizable camera app.
With that said, I would still recommend making some tweaks to ImagePicker because it works reliably with expo out of the box and would serve most use cases with no extra effort.
react-native-vision-camera doesn't focus on expo, so you need a bit extra effort to make it work with expo (see its github issues related to expo). Also you do need to implement the common features (zoom, flash, flip, etc) with its API.
So again, the case for expo-image-picker is that many developers are NOT trying to make a camera app. There is a place for ImagePicker.launchCameraAsync with its simplicity and reliability. It just needs some minor tweaks.