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
     <uses-permission android:name="android.permission.CAMERA"/>
9
     <uses-permission android:name="android.permission.CAMERA"/>
10
     <uses-permission android:name="android.permission.RECORD_AUDIO"/>
10
     <uses-permission android:name="android.permission.RECORD_AUDIO"/>
11
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
11
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
12
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
12
     <uses-permission android:name="android.permission.READ_CONTACTS"/>
13
     <uses-permission android:name="android.permission.READ_CONTACTS"/>
13
     <uses-permission android:name="android.permission.READ_CALENDAR"/>
14
     <uses-permission android:name="android.permission.READ_CALENDAR"/>
14
 
15
 

+ 1
- 0
ReactNativePermissions.js View File

24
 		'contacts',
24
 		'contacts',
25
 		'event',
25
 		'event',
26
 		'photo',
26
 		'photo',
27
+		'storage'
27
 	]
28
 	]
28
 }
29
 }
29
 
30
 

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

30
     MICROPHONE,
30
     MICROPHONE,
31
     CONTACTS,
31
     CONTACTS,
32
     EVENT,
32
     EVENT,
33
+    STORAGE,
33
     PHOTO;
34
     PHOTO;
34
   }
35
   }
35
 
36
 
127
         return Manifest.permission.READ_CONTACTS;
128
         return Manifest.permission.READ_CONTACTS;
128
       case EVENT:
129
       case EVENT:
129
         return Manifest.permission.READ_CALENDAR;
130
         return Manifest.permission.READ_CALENDAR;
131
+      case STORAGE:
130
       case PHOTO:
132
       case PHOTO:
131
         return Manifest.permission.READ_EXTERNAL_STORAGE;
133
         return Manifest.permission.READ_EXTERNAL_STORAGE;
132
       default:
134
       default: