From 9420a8683271a4cdb7b557a499a8dcf7b8141afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ph=E1=BA=A1m=20Huy=20Ho=C3=A0ng?= Date: Wed, 16 Aug 2017 11:05:20 +0700 Subject: [PATCH] Update documentation for PermissionsAndroid PermissionsAndroid must be imported for the example to work, otherwise the error "Reference Error: can't find variable PermissionsAndroid" will be shown. https://stackoverflow.com/questions/42434124/why-permissionandroid-doesnt-work --- Libraries/PermissionsAndroid/PermissionsAndroid.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Libraries/PermissionsAndroid/PermissionsAndroid.js b/Libraries/PermissionsAndroid/PermissionsAndroid.js index 69db4e604af386..447c8b60ca7e70 100644 --- a/Libraries/PermissionsAndroid/PermissionsAndroid.js +++ b/Libraries/PermissionsAndroid/PermissionsAndroid.js @@ -48,6 +48,8 @@ type PermissionStatus = 'granted' | 'denied' | 'never_ask_again'; * * ### Example * ``` + * import { PermissionsAndroid } from 'react-native'; + * * async function requestCameraPermission() { * try { * const granted = await PermissionsAndroid.request(