the describe: http://www.rqgg.net/topic/vrvkz-select-multiple-images-from-android-gallery.html
If the caller can handle multiple returned items (the user performing multiple selection), then it can specify EXTRA_ALLOW_MULTIPLE to indicate this.
This is pretty interesting. Here they are referring it to the use case where a user can select multiple items?
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
public void selectPhotos(){
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
startActivityForResult(Intent.createChooser(intent,
"select multiple images"), SELECT_PHOTOS_RESULT);
}
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
if (resultCode == RESULT_OK) {
switch (requestCode) {
case SELECT_PHOTOS_RESULT:
//how to get the Uris?
...
break;
}
}