1

As the title states, I am wondering how to open the Android image gallery directly from my app. Every single package that is out there, including react-native-image-picker, react-native-image-crop-picker, and yes, even Expo's expo-image-picker all open the "Recents" area!

Opening the gallery MUST be possible, since apps like Whatsapp, Tinder, Facebook, etc. all have this functionality when choosing pictures.

Such a simple functionality - and yet after a month of on and off search I have come up with no solution. Can anybody provide me with a way to do this? Or guide me in the correct direction? At this point I am prepared to write native Android code or custom React Native to get this to work.

fullStackChris
  • 1,300
  • 1
  • 12
  • 24
  • It is unclear what you want. There are 'gallery apps' like Gallery, Photos, Fotos and such. The user can start these apps. And your app can let users pick files with ACTION_PICK, ACTION_GET_CONTENT and so on. What do you have in mind? – blackapps Oct 20 '21 at 11:41
  • `all open the "Recents" area!` Can be. But after that the user can navigate to other places and you are in what you call 'the gallery'. Or not? And do you just want to let the user browse or let them pick a file or so? – blackapps Oct 20 '21 at 11:43
  • This is indeed true. But the product managers "require" that an albums or image grid view open immediately... – fullStackChris Oct 20 '21 at 12:59
  • And you do not wanna pick a file? Half answer... – blackapps Oct 20 '21 at 15:46
  • Its fine to say if you don't know how – fullStackChris Nov 08 '21 at 15:15

1 Answers1

0

i found this library react-native-multiple-image-picker it will open camera roll not recent file

Firas Abu Fares
  • 511
  • 1
  • 6
  • 24
  • This looks promising, but still at the end of the day is a React Native UI element on top of the native libraries. What we need is configuration for the android intent that is fired, you can see how it is done for example in the native code in react-native-image-picker: https://github.com/ivpusic/react-native-image-crop-picker/blob/5333954ae411da4c9e948ea6658ab414e66ed211/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java#L359-L386 – fullStackChris Nov 17 '21 at 09:36