Skip to content

Commit c6d7cc7

Browse files
committed
2 parents ce2203a + 8355ad2 commit c6d7cc7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
A FileBrowser / FileChooser for Android that you can integrate to your app to browse/select files from internal/external storage.
44

5+
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Android--FileBrowser--FilePicker-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/5636)
6+
57
# Using Maven
68
``` xml
79
<dependency>
@@ -53,15 +55,15 @@ Use following Intent to start the FileChooser
5355
``` java
5456
Intent i2 = new Intent(getApplicationContext(), FileChooser.class);
5557
i2.putExtra(Constants.SELECTION_MODE,Constants.SELECTION_MODES.SINGLE_SELECTION.ordinal());
56-
startActivityForResult(i2,PICK_CONTACT_REQUEST);
58+
startActivityForResult(i2,PICK_FILE_REQUEST);
5759
```
5860

5961

6062
To get the selected file, In your calling activity's onActivityResult method, use the following
6163

6264
```java
6365

64-
if (requestCode == PICK_CONTACT_REQUEST && data!=null) {
66+
if (requestCode == PICK_FILE_REQUEST && data!=null) {
6567
if (resultCode == RESULT_OK) {
6668
Uri file = data.getData();
6769
}
@@ -74,14 +76,14 @@ if (requestCode == PICK_CONTACT_REQUEST && data!=null) {
7476
``` java
7577
Intent i2 = new Intent(getApplicationContext(), FileChooser.class);
7678
i2.putExtra(Constants.SELECTION_MODE,Constants.SELECTION_MODES.MULTIPLE_SELECTION.ordinal());
77-
startActivityForResult(i2,PICK_CONTACT_REQUEST);
79+
startActivityForResult(i2,PICK_FILE_REQUEST);
7880
```
7981

8082
To get the selected file, In your calling activity's onActivityResult method, use the following
8183

8284
```java
8385

84-
if (requestCode == PICK_CONTACT_REQUEST && data!=null) {
86+
if (requestCode == PICK_FILE_REQUEST && data!=null) {
8587
if (resultCode == RESULT_OK) {
8688
ArrayList<Uri> selectedFiles = data.getParcelableArrayListExtra(Constants.SELECTED_ITEMS);
8789
}

0 commit comments

Comments
 (0)