Browse Source

added explicit permission for external storage

Yonah Forst 7 years ago
parent
commit
bdf121d038

+ 1
- 0
Example/android/app/src/main/AndroidManifest.xml View File

@@ -9,6 +9,7 @@
9 9
     <uses-permission android:name="android.permission.CAMERA"/>
10 10
     <uses-permission android:name="android.permission.RECORD_AUDIO"/>
11 11
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
12
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
12 13
     <uses-permission android:name="android.permission.READ_CONTACTS"/>
13 14
     <uses-permission android:name="android.permission.READ_CALENDAR"/>
14 15
 

+ 1
- 0
ReactNativePermissions.js View File

@@ -24,6 +24,7 @@ const RNPTypes = {
24 24
 		'contacts',
25 25
 		'event',
26 26
 		'photo',
27
+		'storage'
27 28
 	]
28 29
 }
29 30
 

+ 2
- 0
android/src/main/java/com/joshblour/reactnativepermissions/ReactNativePermissionsModule.java View File

@@ -30,6 +30,7 @@ public class ReactNativePermissionsModule extends ReactContextBaseJavaModule {
30 30
     MICROPHONE,
31 31
     CONTACTS,
32 32
     EVENT,
33
+    STORAGE,
33 34
     PHOTO;
34 35
   }
35 36
 
@@ -127,6 +128,7 @@ public class ReactNativePermissionsModule extends ReactContextBaseJavaModule {
127 128
         return Manifest.permission.READ_CONTACTS;
128 129
       case EVENT:
129 130
         return Manifest.permission.READ_CALENDAR;
131
+      case STORAGE:
130 132
       case PHOTO:
131 133
         return Manifest.permission.READ_EXTERNAL_STORAGE;
132 134
       default: