According to Intent.EXTRA_ALLOW_MULTIPLE
documentation:
Used to indicate that a ACTION_GET_CONTENT intent can allow the user to select and return multiple items. This is a boolean extra; the default is false. If true, an implementation of ACTION_GET_CONTENT is allowed to present the user with a UI where they can pick multiple items that are all returned to the caller. When this happens, they should be returned as the getClipData() part of the result Intent.
So we can use it as:
startActivityForResult(new Intent(Intent.ACTION_GET_CONTENT).putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true).setType("image/*");
But this is available for Android API 18+ only.
So my question is can we use it for older versions of Android API levels using Android Support Library?
If yes, How?
can we use it for older versions of Android API levels using Android Support Library?
No, we can't, Intent.EXTRA_ALLOW_MULTIPLE
is not included in the Android Support Library, at least at this moment.
I'm afraid you can not use it before API 16. Because to use this you will be required to call getClipData() to get multiple paths/URIs, getClipData
was added in API 16. But its better to use from API 18.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With