is it possible to set default folder in afilechooser?
saeedadeli opened this issue · comments
saeedadeli commented
I want to set a folder in internal memory to open on that folder when user select "choose file" icon.
I also, do as bellow but it does not work:
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("text/plain");
Uri startDir = Uri.fromFile(new File(Environment.getExternalStorageDirectory().getAbsolutePath()+"/myfolder"));
intent.setDataAndType(startDir,
"vnd.android.cursor.dir/lysesoft.andexplorer.file");
intent.addCategory(Intent.CATEGORY_OPENABLE);
ActivityForResult(
Intent.createChooser(intent,getString(R.string.choose_file)),
FILE_SELECT_CODE);