Skip to content

Commit 10c95f4

Browse files
Merge remote-tracking branch 'origin/master'
2 parents acf9310 + 9b7e27b commit 10c95f4

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Add the following code to your gradle build script.
2424
maven {url "https://jitpack.io"}
2525
}
2626
dependencies {
27-
compile 'com.github.DeveloperPaul123:FilePickerLibrary:1.0.0'
27+
compile 'com.github.DeveloperPaul123:FilePickerLibrary:2.0.0'
2828
}
2929
````
3030

@@ -81,6 +81,18 @@ filePicker.putExtra(FilePickerActivity.MIME_TYPE, FileType.PNG);
8181
startActivityForResult(filePicker, FilePickerActivity.REQUEST_FILE);
8282
```
8383

84+
Finally, you can now use a builder class to simplify intent creation:
85+
86+
```java
87+
new FilePickerBuilder(getActivity()).withColor(android.R.color.holo_blue_bright)
88+
.withRequestCode(FilePicker.REQUEST_FILE)
89+
.withScopeType(FileScopeType.ALL)
90+
.withMimeType(FileType.PNG)
91+
.useMaterialActivity(true)
92+
.launch();
93+
```
94+
You can also call ` build() ` instead of ` launch() ` and you will get back an activity. Note that `launch()` starts the activity with `startActivityForResult() ` and uses the request code you passed into the builder as the request code for the activity result extra. So when listening for activity results be sure to use the same request code.
95+
8496
<h2>Demo App</h2>
8597
* **Check out the sample on google play.**
8698

0 commit comments

Comments
 (0)