chore(doc) add android permissions section
This commit is contained in:
parent
0d1059ef75
commit
ec664ac294
12
README.md
12
README.md
|
@ -52,14 +52,22 @@ import CameraRoll from "@react-native-community/cameraroll";
|
|||
|
||||
`CameraRoll` provides access to the local camera roll or photo library.
|
||||
|
||||
On iOS, the `CameraRoll` API requires the `RNCCameraRoll` library to be linked. You can refer to [Linking Libraries (iOS)](linking-libraries-ios.md) to learn more.
|
||||
|
||||
### Permissions
|
||||
|
||||
The user's permission is required in order to access the Camera Roll on devices running iOS 10 or later. Add the `NSPhotoLibraryUsageDescription` key in your `Info.plist` with a string that describes how your app will use this data. This key will appear as `Privacy - Photo Library Usage Description` in Xcode.
|
||||
|
||||
If you are targeting devices running iOS 11 or later, you will also need to add the `NSPhotoLibraryAddUsageDescription` key in your `Info.plist`. Use this key to define a string that describes how your app will use this data. By adding this key to your `Info.plist`, you will be able to request write-only access permission from the user. If you try to save to the camera roll without this permission, your app will exit.
|
||||
|
||||
On Android permission is required to read the external storage. Add below line to your manifest to request this permission on app install.
|
||||
|
||||
```
|
||||
<manifest>
|
||||
...
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
...
|
||||
<application>
|
||||
```
|
||||
|
||||
### Methods
|
||||
|
||||
* [`saveToCameraRoll`](cameraroll.md#savetocameraroll)
|
||||
|
|
Loading…
Reference in New Issue