How to get Multiple image uri from gallery with intent filter

好久不见. 提交于 2019-12-13 08:26:15

问题


I want to get multiple image URI using intent filter without implements a whole custom filechooser.

To get the URI of a single image I use

private void openImage() {
        try {
            Intent i = new Intent(Intent.ACTION_GET_CONTENT);
            i.setType("image/*");
            startActivityForResult(i, FILE_REQ_CODE);
        } catch (RuntimeException e) {

        }

    }

protected void onActivityResult(int requestCode, int resultCode,
            Intent intentData) {
        try {
            Uri tmp = intentData.getData();
            filePath = getRealFilePathFromURI(tmp);
            super.onActivityResult(requestCode, resultCode, intentData);
        } catch (RuntimeException e) {

        }

    }

That works fine...

However I don't know how to get multiple selection using Intent filters.

How could I get multiple URI?


回答1:


There is no means to get multiple images, at least not through standard Intent actions like ACTION_GET_CONTENT. Sorry!



来源:https://stackoverflow.com/questions/12919564/how-to-get-multiple-image-uri-from-gallery-with-intent-filter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!