2017-08-30 31 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