4

I am using react-native-image-picker and I would like to access gallery images directly from the device. However, when I launch ImageLibrary using the following method, I would see further 2 options saying "Pictures", "Download".

enter image description here

Instead I would like to see all the library images in grid fashion like below.

enter image description here

ImagePicker.launchImageLibrary(options, (response)  => {
     if (response.didCancel) {
       console.log('User cancelled photo picker');
     }
     else if (response.error) {
       console.log('ImagePicker Error: ', response.error);
     }
     else if (response.customButton) {
       console.log('User tapped custom button: ', response.customButton);
     }
     else {
       this.props.navigation.navigate('AddImage', {uri: response.uri, addImage: this.addImage.bind(this)});
     }
   });
Inaccessible
  • 1,560
  • 3
  • 18
  • 42

1 Answers1

0

I have a little bit idea but Not much that you have asked. It just directly launch Camera and Image library only. maybe helpful to you.

// Launch Camera:
ImagePicker.launchCamera(options, (response) => {
  // Same code as in above section!
});

// Open Image Library:
ImagePicker.launchImageLibrary(options, (response) => {
  // Same code as in above section!
});

For more, Click here

Elavarasan r
  • 1,055
  • 2
  • 12
  • 22