From 9b7e27b8ad41dd31b271e8ebcdf4aa4962168e8d Mon Sep 17 00:00:00 2001 From: DeveloperPaul123 Date: Mon, 23 Nov 2015 17:17:23 -0500 Subject: [PATCH] Update README.md --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4f14d21..5e825cb 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Add the following code to your gradle build script. maven {url "https://jitpack.io"} } dependencies { - compile 'com.github.DeveloperPaul123:FilePickerLibrary:1.0.0' + compile 'com.github.DeveloperPaul123:FilePickerLibrary:2.0.0' } ```` @@ -81,6 +81,18 @@ filePicker.putExtra(FilePickerActivity.MIME_TYPE, FileType.PNG); startActivityForResult(filePicker, FilePickerActivity.REQUEST_FILE); ``` +Finally, you can now use a builder class to simplify intent creation: + +```java +new FilePickerBuilder(getActivity()).withColor(android.R.color.holo_blue_bright) + .withRequestCode(FilePicker.REQUEST_FILE) + .withScopeType(FileScopeType.ALL) + .withMimeType(FileType.PNG) + .useMaterialActivity(true) + .launch(); +``` +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. +

Demo App

* **Check out the sample on google play.**