|
@@ -83,8 +83,8 @@ Promises resolve into one of these statuses
|
83
|
83
|
| Return value | Notes|
|
84
|
84
|
|---|---|
|
85
|
85
|
|`authorized`| user has authorized this permission |
|
86
|
|
-|`denied`| user has denied permissions at least once. On iOS this means that the user will not be prompted again. Android users can be promted multiple times until they select 'Never ask me again'|
|
87
|
|
-|`restricted`| iOS only|
|
|
86
|
+|`denied`| user has denied this permission at least once. On iOS this means that the user will not be prompted again. Android users can be promted multiple times until they select 'Never ask me again'|
|
|
87
|
+|`restricted`| *(iOS only)* user is not able to grant this permission, either because it's not supported by the device or because it has been blocked by parental controls. |
|
88
|
88
|
|`undetermined`| user has not yet been prompted with a permission dialog |
|
89
|
89
|
|
90
|
90
|
###Supported permission types
|
|
@@ -106,7 +106,7 @@ Promises resolve into one of these statuses
|
106
|
106
|
| Method Name | Arguments | Notes
|
107
|
107
|
|---|---|---|
|
108
|
108
|
| `getPermissionStatus` | `type` | - Returns a promise with the permission status. Note: for type `location`, iOS `AuthorizedAlways` and `AuthorizedWhenInUse` both return `authorized` |
|
109
|
|
-| `requestPermission` | `type` | - Accepts any permission type except `backgroundRefresh`. If the current status is `undetermined`, shows the permission dialog and returns a promise with the resulting status. Otherwise, immediately return a promise with the current status. Note: see below for special cases|
|
|
109
|
+| `requestPermission` | `type` | - Accepts any permission type except `backgroundRefresh`. If the current status is `undetermined`, shows the permission dialog and returns a promise with the resulting status. Otherwise, immediately return a promise with the current status. See iOS Notes for special cases|
|
110
|
110
|
| `checkMultiplePermissions` | `[types]` | - Accepts an array of permission types and returns a promise with an object mapping permission types to statuses |
|
111
|
111
|
| `getPermissionTypes` | *none* | - Returns an array of valid permission types |
|
112
|
112
|
| `openSettings` | *none* | - Switches the user to the settings page of your app (iOS 8.0 and later) |
|
|
@@ -132,6 +132,9 @@ Permission type `bluetooth` represents the status of the `CBPeripheralManager`.
|
132
|
132
|
```
|
133
|
133
|
|
134
|
134
|
###Android Notes
|
|
135
|
+
|
|
136
|
+Requires RN >= 0.29.0
|
|
137
|
+
|
135
|
138
|
All required permissions also need to be included in the Manifest before they can be requested. Otherwise `requestPermission` will immediately return `denied`.
|
136
|
139
|
|
137
|
140
|
Permissions are automatically accepted for targetSdkVersion < 23 but you can still use `getPermissionStatus` to check if the user has disabled them from Settings.
|
|
@@ -200,4 +203,4 @@ public class MainApplication extends Application implements ReactApplication {
|
200
|
203
|
|
201
|
204
|
...
|
202
|
205
|
}
|
203
|
|
-```
|
|
206
|
+```
|