title: Select multiple images from android gallery
body: <p>So basically what i am trying to achieve is opening the <code>Gallery</code> in Android and let the user select <code>multiple images</code>. Now this question has been asked <strong>frequently</strong> but i'm not satisfied with the answers. Mainly because i found something interesting in de docs in my IDE (i come back on this later) and thereby i don't want to use a custom adapter but just the vanilla one.</p>
  
  <p>Now my code for selecting one image is:</p>
  
  <pre><code>Intent intent = new Intent();
  intent.setType("image/*");
  intent.setAction(Intent.ACTION_GET_CONTENT);
  startActivityForResult(Intent.createChooser(intent,"Select Picture"), 1);
  </code></pre>
  
  <p>Now People on SO and other websites wil tell you you have 2 options:</p>
  
  <p>1) Do not use <code>ACTION_GET_CONTENT</code> but <code>ACTION_SEND_MULTIPLE</code> instead. 
   <br> This one doesn't work. This one is according to the docs for <code>sending</code> files and not <code>retrieving</code> and that's exactly what it does. When using ACTION_SEND_MULTIPLE i got a window opened at my device where i have to select an application to send my data to. That's not what i want, so i wonder how people got this achieved with this solution.. Do i miss something?</p>
  
  <p>2) Implement an <code>custom Gallery</code>. Now this is my last option i will consider because imho it's not what i am searching for because i have to style it myself AND why the heck you just can't select multiple images in the vanilla gallery?</p>
  
  <p>There must be an option for this.. Now the interesting thing what i'v found is this:
  <br><em>I found this in the docs description of <code>ACTION_GET_CONTENT</code>.</em></p>
  
  <blockquote>
    <p>If the caller can handle multiple returned items (the user performing
    multiple    selection), then it can specify EXTRA_ALLOW_MULTIPLE to
    indicate this.</p>
  </blockquote>
  
  <p>This is pretty interesting. Here they are referring it to the use case where a user can select multiple items?</p>
  
  <p>Later on they say in the docs:</p>
  
  <blockquote>
    <p>You may use EXTRA_ALLOW_MULTIPLE to allow the user to select multiple
    items.</p>
  </blockquote>
  
  <p>So this is pretty obvious right? This is what i need. But my following question is: Where can i put this <code>EXTRA_ALLOW_MULTIPLE</code>? The sad thing is that i can't find this no where in the <strong>developers.android guide</strong> and also is this not defined as a constant in the INTENT class.</p>
  
  <p>Anybody can help me out with this <code>EXTRA_ALLOW_MULTIPLE</code>?</p>