iPaulPro / aFileChooser

[DEPRECATED] Android library that provides a file explorer to let users select files on external storage.
Apache License 2.0
1.79k stars 850 forks source link

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

Open alexbbb opened 10 years ago

alexbbb commented 10 years ago

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);