2017-08-30 78 views

回答

2

试试这个,你可以指定你的intent.setType这样

intent.setType("application/x-excel|application/pdf|text/plain"); 
+0

需要有一个文件资源管理器应用程序 – Pritish

2

尝试;

Intent intent = new Intent(); 
    intent.setType("*/*"); 
    intent.setAction(Intent.ACTION_GET_CONTENT); 
    startActivityForResult(Intent.createChooser(intent,"Choose File to Upload.."),PICK_FILE_REQUEST); 
+0

我做intent.setType( “*/*”);但它只显示图像和视频文件 – Pritish