static List<Uri> collectUrisFromData(Intent data) {
        // Default Gallery app on older Android versions doesn't support multiple image
        // picking and thus never uses clip data.
        if (data.getClipData() == null) {
            return Collections.singletonList(data.getData());
        }

        ClipData clipData = data.getClipData();
        List<Uri> fileUris = new ArrayList<>(clipData.getItemCount());

        for (int i = 0; i < clipData.getItemCount(); ++i) {
            fileUris.add(clipData.getItemAt(i).getUri());
        }

        return fileUris;
    }
Verifies the content typs of a file URI. A helper function
for isVideoType and isImageType

@param contentMimeType - "video/" or "image/"
@param uri             - file uri
@param context         - react context
@return a boolean to determine if file is of specified content type i.e. image or video
android/src/main/java/com/imagepicker/Utils.java