当前位置:编程学习 > wap >>

android 文件管理器中发送功能


如图所示...
这个是RE文件管理器中选择文件后的发送功能  这个发送是通过什么实现的啊? Android 文件管理器 发送 --------------------编程问答-------------------- 是Intent一个action么? --------------------编程问答-------------------- 我自己搞定了- -
http://blog.csdn.net/yuxiaohui78/article/details/8232402
这个是解决的地址

ArrayList<Uri> uris = new ArrayList<Uri>();
for(int i = 0; i < size; i++){
        File file=(File)list.get(selectedItemIndexes[i]).get("file");
        mimeType = getMIMEType(file);
        Uri u = Uri.fromFile(file);
        uris.add(u); 
      }
           boolean multiple = uris.size() > 1;
            Intent intent = new Intent(multiple ? android.content.Intent.ACTION_SEND_MULTIPLE
                    : android.content.Intent.ACTION_SEND);

            if (multiple) {
                intent.setType("*/*");
                intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris);
            } else {
                intent.setType(mimeType);
                intent.putExtra(Intent.EXTRA_STREAM, uris.get(0));
            }
            startActivity(Intent.createChooser(intent, "Share"));
就可以
补充:移动开发 ,  Android
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,