2

I wan't to allow user to pick multiple files (of any type) and for that i use the following code

Intent intent = new Intent (Intent.ActionGetContent);
intent.SetType ("*/*");
intent.PutExtra (Intent.ExtraAllowMultiple, true);
intent.AddCategory (Intent.CategoryOpenable); 
StartActivityForResult (Intent.CreateChooser (intent, Application.Context.Resources.GetString(Resource.String.message_select_file)), FILE_SELECT_CODE);

If user picks the files with default Google Photos app, then everything works fine - user can pick as many files as he wants, but if the user is choosing files from the gallery app (on HTC and some other devices), only one file can be selected. I know that the gallery app on HTC allows selecting multiple files, because it can be done, when choosing attachemnts for an e-mail.

Is there a way to guarantee that the user will be able to pick multiple files from any app (or from the most popular ones at least)?

Artūrs Eimanis
  • 578
  • 3
  • 5
  • 22
  • Possible duplicate of [Select multiple files with Intent.ACTION\_GET\_CONTENT](http://stackoverflow.com/questions/19513556/select-multiple-files-with-intent-action-get-content) – SushiHangover Apr 29 '16 at 09:57
  • The short answer is if the other app (or if it is a pre-API18 application) was not written to support `EXTRA_ALLOW_MULTIPLE` then there is nothing you can do to change it... – SushiHangover Apr 29 '16 at 10:01
  • @Artūrs Eimanis did you solved this problem – Gowthaman M May 03 '18 at 07:29

0 Answers0