Please sign in to comment.
Handle "Never Ask Again" in permissions and add requestMultiplePermis…
…sions Summary: In order to get featured in the Google Play Store, we had to handle a few specific cases with permissions based on feedback from the editorial team. First, which was previously possible with this permissions module was bumping the sdk to version 23. The second is requesting multiple permissions at one time. In order for the camera + upload to work, we needed to request both camera permissions + media storage in one flow. The last is handling the case where the user checks the "Never Ask Again" box. This will only appear after a user denies a permission once and is then prompted again. The logic for handling this case is taken from here: http://stackoverflow.com/questions/31928868/how-do-we-distinguish-never-asked-from-stop-asking-in-android-ms-runtime-permis/35495372#35495372 We were also seeing a few crashes similar to #10009 due to `onRequestPermissionsResult` being called before `onResume` (http://stackoverflow.com/questions/35205643/why-is-onresume-called-after-onrequestpermissionsresult), so I delaye Closes #10221 Differential Revision: D4232551 fbshipit-source-id: fee698d1c48a2d86623cb87996f3d17f4c10a62e
- Loading branch information...
Showing with 186 additions and 34 deletions.
- +1 −1 Examples/UIExplorer/android/app/build.gradle
- +4 −0 Examples/UIExplorer/android/app/src/main/AndroidManifest.xml
- +21 −14 Examples/UIExplorer/js/PermissionsExampleAndroid.android.js
- +52 −1 Libraries/PermissionsAndroid/PermissionsAndroid.js
- +21 −9 ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java
- +87 −9 ReactAndroid/src/main/java/com/facebook/react/modules/permissions/PermissionsModule.java
Oops, something went wrong.