5

How can I select multiple images from gallery using rememberLauncherForActivityResult() in Jetpack Compose? It's onResult callback returns only one Uri

I'm using Compose on a project where users can upload multiple files at the same time. But I can't seem to find anything about it on the internet.

There was intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true) to be used with startActivityForResult(). Does it have something equivalent in Jetpack Compose?

heronet
  • 63
  • 6
  • 6
    This is not really tied to Compose, but rather to whatever contract you are using. `GetMultipleContents` or `OpenMultipleDocuments` on `ActivityResultContracts` seem like what you would want -- what are you using? – CommonsWare Jun 29 '21 at 19:26
  • 1
    Oh. GetMultipleContents gives back a MutableList. That was it. Thanks a lot! – heronet Jun 30 '21 at 08:52

0 Answers0