1

ImagePicker.showImagePicker was removed from the ImagePicker. You can now either launchCamera or launchImageLibrary.

What will be the best alternative to allow the user to do both (Camera or Library)?

Edit: I am looking for a library that would allow me to avoid implementing two different buttons. I have an "Add image" icon that I want to be used for both.

AYBABTU
  • 986
  • 3
  • 17
  • 39

2 Answers2

0

Have a 2 Button. 1 for each function

Jimbo Magusib
  • 191
  • 2
  • 3
  • Thanks, but I am looking for a library that does that like it was implemented with ImagePicker.showImagePicker. Don't want to implement it myself – AYBABTU May 26 '21 at 14:21
0

You can create a BottomSheet that unfolds when the user presses your button.

When the BottomSheet is displayed you can show the two options, where the user chooses which one suits him best, whether to open the gallery or open the camera.

AlejandroS
  • 634
  • 5
  • 6
  • Thanks, but I am looking for a library that does that like it was implemented with ImagePicker.showImagePicker. Don't want to implement it myself – AYBABTU May 26 '21 at 14:21
  • Ok, I understand your need. I have been searching among the community libraries at: https://reactnative.directory/?search=image+picker However, I did not find something that meets your need, if I find a library I will comment on any discovery. – AlejandroS May 26 '21 at 14:53