我想让用户从他的Android设备中选择一些文件,将其上传到服务器上。
如何显示文件浏览器并让用户选择任何(图像/音频/视频)文件(单个或多个选择)来上传它。
我该如何实现呢。
请帮助。
谢谢..
答案 0 :(得分:3)
答案 1 :(得分:1)
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("audio/*");
startActivity(Intent.createChooser(intent, "Select music"));