darsh2 / MultipleImageSelect

Android library that provides for multiple image selection.
Apache License 2.0
300 stars 112 forks source link

File URi or File descriptor instead of image #27

Open abdullahumer opened 8 years ago

abdullahumer commented 8 years ago

Is there any way to return an array Uri or file descriptors of images instead of the images itself ?

darsh2 commented 8 years ago

One possible way is when you get the selected images from the library, you can iterate through and obtain the URI for each image individually as:

ArrayList<Image> images = data.getParcelableArrayListExtra(Constants.INTENT_EXTRA_IMAGES);
for (int i = 0, l = images.size(); i < l; i++) {
    fileUris.add(new File(images.get(i).path).toURI());
}