Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 30c6a0b

Browse files
authored
Merge pull request #52 from dphov/patch-2
Update README.md
2 parents 56b035f + 97a9231 commit 30c6a0b

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,34 @@ Link package using [rnpm](https://github.com/rnpm/rnpm)
4444
rnpm link
4545
```
4646

47+
Add this code to `MainApplication.java`
48+
49+
```diff
50+
...
51+
+ import com.RNFetchBlob.RNFetchBlobPackage;
52+
...
53+
protected List<ReactPackage> getPackages() {
54+
return Arrays.<ReactPackage>asList(
55+
new MainReactPackage(),
56+
+ new RNFetchBlobPackage()
57+
);
58+
}
59+
};
60+
...
61+
```
62+
63+
And this code to `MainActivity.java` (react-native >= 0.29.0)
64+
65+
```diff
66+
...
67+
+ @Override
68+
+ public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
69+
+ RNPermissionsPackage.onRequestPermissionsResult(requestCode, permissions, grantResults); // very important event callback
70+
+ super.onRequestPermissionsResult(requestCode, permissions, grantResults);
71+
+ }
72+
...
73+
```
74+
4775
**Grant Permission to External storage for Android 5.0 or lower**
4876

4977
Mechanism about granting Android permissions has slightly different since Android 6.0 released, please refer to [Official Document](https://developer.android.com/training/permissions/requesting.html).

0 commit comments

Comments
 (0)