0
我使用下面的代碼來打開我的應用程序創建的文件夾,但它不工作,雖然我從Trying open a specific folder in android using intent得到它打開特定文件夾。Android中與點擊
public void openFolder() {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
String pa = sharedPreferences.getString("path", "");
Intent intent = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.parse(pa);
intent.setDataAndType(uri, "*/*");
startActivity(Intent.createChooser(intent, "Open folder"));
}
當我唱ACTION_VIEW,它顯示了一切可能的手段,除了FileManager
和ACTION_GET_CONTENT
它把我帶到SAF模式都喜歡選擇儲存,然後特定的文件夾。
如何將它直接打開我的定義URI文件夾?有沒有其他方法?
參考http://stackoverflow.com/questions/17165972/android-how-to-open-a-specific-folder-via-intent-and-show - 它的內容-IN-A-文件 – sasikumar