androidexporeact-nativeandroid-imagereact-native-image-picker

expo-image-picker android doesn't have a select button


I am using react native and expo and the expo-image-picker is working great on iOs and mostly great on android with one exception. There is no "okay" or "select" or "done" button when a user pulls a picture from gallery.

The user has to click the crop button to accept the image. Is this typical? I feel like this will be confusing and a bad user experience...

const chooseImage = async (useCamera, index) => {
if (!(await checkPermission(useCamera))) {
  Alert.alert(
    "Permission missing.",
    "Camera permission is required to take image."
  );
  return;
}
const method = useCamera ? "launchCameraAsync" : "launchImageLibraryAsync";
const result = await ImagePicker[method]({
  allowsEditing: true,
  base64: false,
  aspect: [3, 4],
});
if (!result.cancelled) {
  // upload image and retrieve image url
  const {height, width, type, uri} = result;
  profile.images[index] = uri;
  if (uri != null) {
    setProfile(profile);
  }
  setChangedValue("images");
}
};

enter image description here

UPDATE Found that I can select the photo if I remove editing ability allowsEditing. But I want the user to be able to edit so I am curious why editing doesn't have an "okay" button on it?


Solution

  • I found that the crop button is the "done" button.

    There is no other way to implement the selection of the image, so this is just a design aspect of the image picker.