android-folder-picker-library Code
A light-weight android library that can be quickly integrated into any
Brought to you by:
kashlin
| File | Date | Author | Commit |
|---|---|---|---|
| .idea | 2017-05-25 |
|
[a0217a] Initial commit |
| app | 2017-06-01 |
|
[f0f29a] Added screenshots to show in README |
| folderpicker | 2017-05-31 |
|
[95890e] changed gradle to release new version |
| gradle | 2017-05-25 |
|
[a0217a] Initial commit |
| screenshots | 2017-06-01 |
|
[f0f29a] Added screenshots to show in README |
| .gitignore | 2017-05-25 |
|
[a0217a] Initial commit |
| LICENSE | 2017-05-26 |
|
[d3730c] Added Apache License |
| README.md | 2017-06-02 |
|
[3cf3bc] Added demo in README |
| build.gradle | 2017-05-25 |
|
[e402e0] prepared to release library |
| gradle.properties | 2017-05-25 |
|
[a0217a] Initial commit |
| gradlew | 2017-05-25 |
|
[a0217a] Initial commit |
| gradlew.bat | 2017-05-25 |
|
[a0217a] Initial commit |
| settings.gradle | 2017-05-25 |
|
[a0217a] Initial commit |
A light-weight android library that can be quickly integrated into any app to let users choose folder, also files (but esp built for folders).
![]() |
![]() |
![]() |
|---|---|---|
| Can pick folders | Can create folder | Can also pick file |
For your convenience, it is available on jCenter, So just add this in your app dependencies:
compile 'lib.kashif:folderpicker:2.2'
To pick folder
Intent intent = new Intent(this, FolderPicker.class);
startActivityForResult(intent, FILEPICKER_CODE);
```java
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
if (requestCode == FILEPICKER_CODE && resultCode == Activity.RESULT_OK) {
String folderLocation = intent.getExtras().getString("data");
Log.i( "folderLocation", folderLocation );
}
}
```
Options
```java
//To show a custom title
intent.putExtra("title", "Select file to upload");
//To begin from a selected folder instead of sd card's root folder. Example : Pictures directory
intent.putExtra("location", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getAbsolutePath());
//To pick files
intent.putExtra("pickFiles", true);
```