图片、视频批量分享与单个分享的实现(修改android4.4图库系列四(上)——自定义应用选择器,实现单个图片分享功能)代码很相似。具体修改如下:
1、将Intent的action由Intent.ACTION_SEND改为Intent.ACTION_SEND_MULTIPLE。
2、将Intent的type类型有“image/*”改为“*/*”。
3、将shareIntent.putExtra(Intent.EXTRA_STREAM, MenuExecutor.uri);
改为shareIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uriArrayList);