如何从意图滤镜库得到多个图像URI [英] How to get Multiple image uri from gallery with intent filter

查看:169
本文介绍了如何从意图滤镜库得到多个图像URI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用意图过滤器没有实现一个整体的自定义文件选择来获得多个图像URI。

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

要获得我用一个单一的形象的URI

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) {

        }

    }

这工作得很好...

不过,我不知道如何使用意图过滤器来获得多重选择。

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

如何能得到多个URI?

How could I get multiple URI?

推荐答案

有没有手段来获得多个图像,至少不是通过像<$ C标准意图行动$ C> ACTION_GET_CONTENT 。对不起!

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

这篇关于如何从意图滤镜库得到多个图像URI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆