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

Added option to pass a root PATH in the intent that launches the activity #22

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

alexbbb
Copy link

@alexbbb alexbbb commented Aug 2, 2013

I've modified your code a little bit to be able to specify an initial root path for aFileChooser, by adding the PATH string extra to the intent that starts the FileChooserActivity. I think it may be useful for others. Thank you for the excellent work you've done. Now with little effort I have a very good file picker in my App.

Example usage:
private static final int FILE_CHOOSER = 1234;

Intent chooseFile = new Intent(context, FileChooserActivity.class);
chooseFile.putExtra(FileChooserActivity.PATH, "/your/custom/root/path");
startActivityForResult(chooseFile, FILE_CHOOSER);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant