Tres Trantham 8 éve
szülő
commit
0414316163
1 módosított fájl, 15 hozzáadás és 13 törlés
  1. 15 13
      README.md

+ 15 - 13
README.md

@@ -12,6 +12,7 @@ The current supported permissions are:
 - Bluetooth *(iOS only)*
 - Push Notifications *(iOS only)*
 - Background Refresh *(iOS only)*
+- Speech Recognition *(iOS only)*
 
 
 ###New in version 0.2.X
@@ -51,10 +52,10 @@ const Permissions = require('react-native-permissions');
 
   //check the status of multiple permissions
   _checkCameraAndPhotos() {
-    Permissions.checkMultiplePermissions(['camera', 'photo'])
+    Permissions.checkMultiplePermissions(['camera', 'photo', 'speechRecognition'])
       .then(response => {
         //response is an object mapping type to permission
-        this.setState({ 
+        this.setState({
           cameraPermission: response.camera,
           photoPermission: response.photo,
         })
@@ -62,7 +63,7 @@ const Permissions = require('react-native-permissions');
   }
 
   // this is a common pattern when asking for permissions.
-  // iOS only gives you once chance to show the permission dialog, 
+  // iOS only gives you once chance to show the permission dialog,
   // after which the user needs to manually enable them from settings.
   // the idea here is to explain why we need access and determine if
   // the user will say no, so that we don't blow our one chance.
@@ -73,7 +74,7 @@ const Permissions = require('react-native-permissions');
       'We need access so you can set your profile pic',
       [
         {text: 'No way', onPress: () => console.log('permission denied'), style: 'cancel'},
-        this.state.photoPermission == 'undetermined'? 
+        this.state.photoPermission == 'undetermined'?
           {text: 'OK', onPress: this._requestPermission.bind(this)}
           : {text: 'Open Settings', onPress: Permissions.openSettings}
       ]
@@ -108,6 +109,7 @@ Promises resolve into one of these statuses
 |`reminder`| ✔️ | ❌ |
 |`notification`| ✔️ | ❌ |
 |`backgroundRefresh`| ✔️ | ❌ |
+|`speechRecognition`| ✔️ | ❌ |
 
 ###Methods
 | Method Name | Arguments | Notes
@@ -152,13 +154,13 @@ All required permissions also need to be included in the Manifest before they ca
 
 Permissions are automatically accepted for targetSdkVersion < 23 but you can still use `getPermissionStatus` to check if the user has disabled them from Settings.
 
-Here's a map of types to Android system permissions names:  
-`location` -> `android.permission.ACCESS_FINE_LOCATION`  
-`camera` -> `android.permission.CAMERA`  
-`microphone` -> `android.permission.RECORD_AUDIO`  
-`photo` -> `android.permission.READ_EXTERNAL_STORAGE`  
-`contacts` -> `android.permission.READ_CONTACTS`  
-`event` -> `android.permission.READ_CALENDAR`  
+Here's a map of types to Android system permissions names:
+`location` -> `android.permission.ACCESS_FINE_LOCATION`
+`camera` -> `android.permission.CAMERA`
+`microphone` -> `android.permission.RECORD_AUDIO`
+`photo` -> `android.permission.READ_EXTERNAL_STORAGE`
+`contacts` -> `android.permission.READ_CONTACTS`
+`event` -> `android.permission.READ_CALENDAR`
 
 You can request write access to any of these types by also including the appropriate write permission in the Manifest. Read more here: https://developer.android.com/guide/topics/security/permissions.html#normal-dangerous
 
@@ -169,7 +171,7 @@ npm install --save react-native-permissions
 rnpm link
 ````
 
-###Or manualy linking   
+###Or manualy linking
 
 ####iOS
 * Run open node_modules/react-native-permissions
@@ -221,7 +223,7 @@ public class MainApplication extends Application implements ReactApplication {
 ##Troubleshooting
 
 #### Q: Android - `undefined is not a object (evaluating 'RNPermissions.requestPermissions')`
-A: `rnpm` may not have linked correctly. Follow the manual linking steps and make sure the library is linked 
+A: `rnpm` may not have linked correctly. Follow the manual linking steps and make sure the library is linked
 
 #### Q: iOS - app crashes as soon as I request permission
 A: starting with xcode 8, you need to add permission descriptions. see iOS notes for more details. Thanks to @jesperlndk for discovering this.