Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

is it possible to set default folder in afilechooser? #86

Open
saeedadeli opened this issue Oct 16, 2016 · 0 comments
Open

is it possible to set default folder in afilechooser? #86

saeedadeli opened this issue Oct 16, 2016 · 0 comments

Comments

@saeedadeli
Copy link

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);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant