我有一个应用程序,用户可以在其中从SD卡中搜索图像、音频、视频、文档文件,并选择1个文件上传到服务器。
使用以下代码,我可以打开画廊并选择图像、音频、视频,但我不知道如何从画廊中搜索文档。
以下是我的代码。
有人知道如何实现这个吗?非常感谢任何帮助。
使用以下代码,我可以打开画廊并选择图像、音频、视频,但我不知道如何从画廊中搜索文档。
以下是我的代码。
Intent intent = new Intent();
intent.setAction(Intent.ACTION_GET_CONTENT);
//intent.setType("video/*");
//intent.setType("audio/*");
//intent.setType("image/*");
//**What I have to do for view document[.pdf/text/doc] file**
startActivityForResult(Intent.createChooser(intent, "Complete action using"), REQUEST_CODE);
有人知道如何实现这个吗?非常感谢任何帮助。