Browse Source

shouldShowRequestPermissionRationale is not exposed

Mathieu Acthernoene 7 years ago
parent
commit
883df49822
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      index.android.js

+ 2
- 2
index.android.js View File

@@ -1,6 +1,6 @@
1 1
 // @flow
2 2
 
3
-import { AsyncStorage, PermissionsAndroid } from 'react-native'
3
+import { AsyncStorage, NativeModules, PermissionsAndroid } from 'react-native'
4 4
 
5 5
 const permissionTypes = {
6 6
   location: PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,
@@ -52,7 +52,7 @@ class ReactNativePermissions {
52 52
 
53 53
       return getDidAskOnce(permission).then(didAsk => {
54 54
         if (didAsk) {
55
-          return PermissionsAndroid.shouldShowRequestPermissionRationale(
55
+          return NativeModules.PermissionsAndroid.shouldShowRequestPermissionRationale(
56 56
             androidPermission,
57 57
           ).then(shouldShow => (shouldShow ? 'denied' : 'restricted'))
58 58
         }